Hi all,
I've been fighting this problem for some time now and am hoping someone can help. I'm converting a VB6 application to C#. Everything I'm about to show works perfect in VB6, but fails in C#.
I'm making an API call into a C dll, passing a structure. The structure gets values modified in the C side and I should see the modified values in my return structure.
Here are the C structures:
...
Search Result
Collapse
5 results in 0.0040 seconds.
Keywords
Members
Tags
-
Passing structure to unmanaged code from C#
-
C# Compact framework Managed and Unmanaged code
Hi everyone,
I have a dll in c++ and I need to expose some functions to calling from a mobile solution, and I have problems sending a unicode string value
example code:
-----------------------------------
[c++ Test.dll code]:
__declspec(dlle xport) BOOL IsSupportedFile Type(LPWSTR FileType);
BOOL IsSupportedFile Type(LPWSTR FileType)
{
MessageBox(NULL , FileType,... -
need help importing the native DLL??
Hi,
i have a native or an unmanaged DLL that i will use this DLL to conrol an external device and i have tried to call it into c# but i have trouble with non-Blittable types...i have tried marshal these types but i'm not sure whether i achieved it..??
thanks in advance
Suzan -
How to get pointer of an array of struct
Hi,
I need your precious time to help me to resolve this damn problem i have.
I want to get a pointer from an array of struct.
CODE :
[StructLayout(La youtKind.Sequen tial, CharSet = CharSet.Ansi, Pack = 1)]
unsafe public struct TECCPARAM
{
[MarshalAs(Unman agedType.ByValA rray, SizeConst = 64)]
unsafe public char[] ParamStr;
... -
Calling unmarshalled DLL from C#
Hi
I am trying to make a series of calls to an unmarshalled DLL. The header file for the DLL reads as follows:
Code:BOOL WINAPI InitUSB (void); BOOL WINAPI CloseUSB (void); BOOL WINAPI USBReadData(BYTE Endpoint,DWORD BytesToRead,PBYTE DataBuffer); BOOL WINAPI USBSendCommand(BYTE bCmd); BOOL WINAPI USBGetCommand (BYTE bCmd, WORD wLength, PBYTE pData);
In my code I have defined...