473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem in DllImport

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
0 1335

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kurt Ng | last post by:
Hi, y'all. Can anyone help me on this problem? I'm working with a third-party C dll, and I'm having trouble importing into C# the dll's methods that return one of the dll's defined types,...
3
by: Webdiyer | last post by:
I want to integrate SecurID two-factor authentication system of the RSASecurity.inc into our asp.net application,but I get into trouble when trying to call the API functions of the ACE Agent,I got...
3
by: Mohammad-Reza | last post by:
Hi everybody I want to shutdown my computer with my program. I searched in MSDN to find a .NET method that can do that but did'nt find anything but ExitWindowsEx Api. I write following codes to...
11
by: objectref | last post by:
Hi to all, i have a window app and i want to display some info in a console window. I figured out (after a very long search...) how am i supposed to do it and i try using the following code. ...
0
by: Raven | last post by:
When switching from VC7.0 to VC7.1 I've encountered a problem: I have a plugin class like class ATL_NO_VTABLE CDataFlowPlugIn : public CComObjectRootEx<CComSingleThreadModel>, public...
5
by: David++ | last post by:
Hi there, I have built a DLL in Visual C++ 6. When I build the DLL it builds fine for the debug version of the DLL (and this DLL works fine), however, I seem unable to build a Release version of...
0
by: Vizzybit | last post by:
I am attempting to utilise the HBAAPI.dll that can be found at http://hbaapi.sourceforge.net/ (which is also used in hbaverify at http://hbaverify.sourceforge.net/) as I need to get a small subset...
7
by: justin.kruger | last post by:
I am having a problem with exchanging handles with c# and the "CP210xManufacturing.dll" in a device wrapper that i am working on. I have created a wrapper class to address some of the functions...
1
by: JohnCox | last post by:
I have a simple Win32 DLL I wrote named "SimpleLib" that exports two functions. It is written in C++ and compiled with __stdcall (/Gz) and with the preprocessor definition _MBCS (not Unicode). ...
1
by: elke | last post by:
Hi, I want to use an unmanaged dll in C# .net and I'm having some troubles witch a function that should return an array. I'm new at this, so I don't know what I'm doing wrong. Here is some...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.