02-06-2006 04:11 AM
c:\dokumente und einstellungen\axel\eigene dateien\visual studio 2005\projects\locures2005\locures2005\NationalInstruments.NI4882.dll(1) : error C2018: unknown character '0x5'
Is this a problem of the compiler options or are these dll's not usable for C++?
02-06-2006 01:18 PM
02-06-2006 03:19 PM
#include
"NationalInstruments.NI4882.dll"//"LangInt.dll"using
namespace NationalInstruments::NI4882;and added the reference and the path to the project properties.
Will this help you to resolve my problem?
Thanks for your efforts!
Axel Helmbold
02-06-2006 05:17 PM
langint.dll, on the other hand, is a flat wrapper on top of the C API. Its purpose is to help developers who are very familiar with the C API and just want to port a C program to .NET (likely C#).
I hope this helps.02-07-2006 03:38 PM
Thanks for your advise. Sometimes it is much simpler then I thought. Do you know if there is a guideline to the notification of the gpib commands given by the Net-Interface? All I know till now are the ib... statements of the common API explained in the documentation comming with the hardware. The commands in the Browser seems to be different. Or is there a sample code availible. The NET-samples from the standard instalation of the NI488-software seems to be only relevant if you use the langint.dll.
Thanks a lot.
Axel Helmbold
02-08-2006 10:07 AM
02-10-2006 08:34 AM
testDevice.Notify(GpibStatusFlags.DeviceServiceRequest, new NotifyCallback(testDevice_Notify), "Sample user data");
with only 1 parameter in the 2.parameter. Within the Measurement Studio help NotifyCallback has 2 Parameter :
public delegate void NotifyCallback(
object sender,
NotifyData notifyData
);
If I adapt the style how to initialize a thread in C++ and use the notation:
m_GPIBDevice->Notify(GpibStatusFlags::DeviceServiceRequest, gcnew NotifyCallback(gcnew C_MyClass,&C_MyClass::_Notify), "some text");
and
void C_MyClass::_Notify(System::Object^ sender, NotifyData^ e){...}
There is no compiler error but when running the application the following error message appears:
"Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'c:\Dokumente und Einstellungen\Axel\Eigene Dateien\Visual Studio 2005\Projects\FFCCT_2\debug\FFCCT_2.exe'.
Additional Information: A call to PInvoke function 'NationalInstruments.NI4882!g::a' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."
Can you tell me something about the correct notation?
Thank You very much!
Axel Helmbold
02-13-2006 09:21 AM