By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,377 Members | 3,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,377 IT Pros & Developers. It's quick & easy.

Problem in DllImport

P: 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
Nov 22 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.