Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: help Pin
cheeseruler10-Sep-03 2:54
cheeseruler10-Sep-03 2:54 
Generalforce datagrid to display "ahead-0" of integer Pin
MeisterBiber9-Sep-03 3:18
MeisterBiber9-Sep-03 3:18 
GeneralRe: force datagrid to display "ahead-0" of integer Pin
Jim Stewart9-Sep-03 3:20
Jim Stewart9-Sep-03 3:20 
GeneralFrames in axWebBrowser control Pin
Andrlage9-Sep-03 1:52
Andrlage9-Sep-03 1:52 
GeneralRe: Frames in axWebBrowser control Pin
Jagadeesh VN9-Sep-03 3:38
Jagadeesh VN9-Sep-03 3:38 
GeneralRe: Frames in axWebBrowser control Pin
Andrlage9-Sep-03 11:54
Andrlage9-Sep-03 11:54 
GeneralRe: Frames in axWebBrowser control Pin
Arun Chembilath30-Apr-11 7:10
Arun Chembilath30-Apr-11 7:10 
GeneralDLL import and parameters Pin
gmar9-Sep-03 0:56
gmar9-Sep-03 0:56 
Wink | ;) Hello, i'm using a dll with VC++ 6.0 i would like to use it with C#. My problem is that some type of data are not usable with c#.
For exemple i can use char *xx as parameter , but when i want to use a pointer on a structure, it seems impossible to have it working.

MyStruct
{ string field1;
int field2;
}

[DllImport(@"C:\DLL\MyDll.dll",EntryPoint="myfunction",CharSet=CharSet.Ansi)]
unsafe public static extern int myfunction(uint param1,short short param2, MyStruct *pointeronStruct);

It is not working,


[DllImport(@"C:\DLL\MyDll.dll",EntryPoint="ReadCard",CharSet=CharSet.Ansi)]
unsafe public static extern int SecondFunction(uint param1,short param2, byte *field1, int *field2);

so i need to split the structure, when there is only 2 fields, it's not a problem, but when you have 10 fields, it's not the same.

As i cannot modify the dll, i decided to include this dll in a dll where is solve thoses kind of problem and then use the new dll with .NET.

Does someone know how to solve this ?

Thanks by advance


GeneralRe: DLL import and parameters Pin
Jagadeesh VN9-Sep-03 3:49
Jagadeesh VN9-Sep-03 3:49 
GeneralDragDrop registration failed Pin
Nick Seng8-Sep-03 18:24
Nick Seng8-Sep-03 18:24 
Generalusing activex/com listeners (callbacks) Pin
olivier.fillon@csiro.au8-Sep-03 15:47
olivier.fillon@csiro.au8-Sep-03 15:47 
GeneralRe: I have problem to drop image files to PictureBox control... Pin
Nick Parker8-Sep-03 15:38
protectorNick Parker8-Sep-03 15:38 
GeneralRe: I have problem to drop image files to PictureBox control... Pin
Donald_a9-Sep-03 3:36
Donald_a9-Sep-03 3:36 
GeneralStatus Bar with Custom Panels Pin
Clarke768-Sep-03 14:12
Clarke768-Sep-03 14:12 
GeneralGet window content as bitmap Pin
sumeat8-Sep-03 14:10
sumeat8-Sep-03 14:10 
GeneralRe: Get window content as bitmap Pin
azusakt8-Sep-03 15:36
azusakt8-Sep-03 15:36 
Generaltcpclient stream read Pin
mikemilano8-Sep-03 13:12
mikemilano8-Sep-03 13:12 
GeneralRe: tcpclient stream read Pin
leppie8-Sep-03 16:05
leppie8-Sep-03 16:05 
GeneralRe: tcpclient stream read Pin
leppie8-Sep-03 16:05
leppie8-Sep-03 16:05 
GeneralRe: tcpclient stream read Pin
Nick Parker8-Sep-03 16:25
protectorNick Parker8-Sep-03 16:25 
GeneralRe: tcpclient stream read Pin
TimK8-Sep-03 16:19
TimK8-Sep-03 16:19 
GeneralExtand and access the internat Microsoft Office object structure Pin
gicio8-Sep-03 9:47
gicio8-Sep-03 9:47 
GeneralJust a detailed question Pin
jphuphilly8-Sep-03 9:28
jphuphilly8-Sep-03 9:28 
GeneralRe: Just a detailed question Pin
leppie8-Sep-03 10:50
leppie8-Sep-03 10:50 
Questionwhat is the difference between [,] & [][]? Pin
yyf8-Sep-03 8:32
yyf8-Sep-03 8:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.