Connecting Tech Pros Worldwide Help | Site Map

Problem in DllImport

  #1  
Old November 22nd, 2008, 01:15 AM
=?Utf-8?B?d2M=?=
Guest
 
Posts: n/a
I'm trying to develop a window from application on C#, which require some
funtions from a COM DLL. So, I import the dll by using
System.Runtime.Interopservices.DllImport like this,

[DllImport("C:\\Program Files
(x86)\\ZIOSOFT\\Ziostation\\bin\\AxZpalKicker.dll" )]
unsafe public static extern bool CheckZpal(byte * isrunning);

However, I'm getting a System.BadImageFormatException (HRESULT: 0x8007000B)
when trying to call CheckZpal() in one of the method...
The function declaration for CheckZpal in the COM interface is
STDMETHOD() IZpalKicker::CheckZpal ( BYTE * exist );

Can anyone advice what is the problem here? and how to fix it?

Regards,
/wc
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in using win32 DLL in c# Ryanivanka answers 8 July 10th, 2008 01:15 PM
C# WinCE-App: problem in marshal findfirstfile in c# win ce device gudiya answers 1 November 27th, 2007 10:30 AM
GetKeyboardState Problem in C# sharp answers 1 November 15th, 2005 10:53 PM
Problem in calling native DLL functions in C# in PocketPC 2002 environment Pawan Aggarwal answers 2 November 15th, 2005 06:37 AM