Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralC# type casting or converting Pin
kmm_e17-May-05 18:24
susskmm_e17-May-05 18:24 
GeneralRe: C# type casting or converting Pin
Christian Graus17-May-05 19:04
protectorChristian Graus17-May-05 19:04 
GeneralRe: C# type casting or converting Pin
S. Senthil Kumar17-May-05 19:40
S. Senthil Kumar17-May-05 19:40 
QuestionHow to synchronize client database and server database using C#? Pin
pubududilena17-May-05 18:15
pubududilena17-May-05 18:15 
AnswerRe: How to synchronize client database and server database using C#? Pin
Christian Graus17-May-05 19:05
protectorChristian Graus17-May-05 19:05 
GeneralResizing a richTextBox to fit contents please help Pin
OnlyTaz17-May-05 17:44
OnlyTaz17-May-05 17:44 
GeneralC++ dll interoperate with C# Pin
ivyhill17-May-05 15:09
ivyhill17-May-05 15:09 
GeneralRe: C++ dll interoperate with C# Pin
Mervick17-May-05 15:27
Mervick17-May-05 15:27 
go to command prompt where your dll is located.

type: dumpbin -exports xxx.dll
you might get something like this

1 0 00001B60 ?Foo@@YAXXZ

with some other data. The data above is your exported function from your c++ dll.

Next step is to get the function.First, you need this line to interoperate between your c++ dll and c#

using System.Runtime.InteropServices;

Then this is how you call your function by setting the entry point to the information given.

[DllImport(@"cntr.dll", EntryPoint="?Foo@@YAXXZ", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
public extern void Foo();

that's all you need.
GeneralRe: C++ dll interoperate with C# Pin
ivyhill20-May-05 13:19
ivyhill20-May-05 13:19 
GeneralFlushing/closing streams Pin
methodincharge17-May-05 14:04
methodincharge17-May-05 14:04 
GeneralRe: Flushing/closing streams Pin
S. Senthil Kumar17-May-05 19:48
S. Senthil Kumar17-May-05 19:48 
Question?How can I get the I/O Address of a parallel port using WMI? Pin
Member 162442717-May-05 12:26
Member 162442717-May-05 12:26 
Generalmanage a textbox from another form Pin
Sasuko17-May-05 12:20
Sasuko17-May-05 12:20 
GeneralRe: manage a textbox from another form Pin
DavidNohejl17-May-05 13:24
DavidNohejl17-May-05 13:24 
GeneralRe: manage a textbox from another form Pin
Anonymous17-May-05 21:11
Anonymous17-May-05 21:11 
GeneralRe: manage a textbox from another form Pin
MoustafaS18-May-05 2:16
MoustafaS18-May-05 2:16 
Generalfsdffsfsa Pin
Ken Fredrikson17-May-05 11:17
Ken Fredrikson17-May-05 11:17 
GeneralRe: fsdffsfsa Pin
Luis Alonso Ramos17-May-05 19:34
Luis Alonso Ramos17-May-05 19:34 
GeneralRe: fsdffsfsa Pin
MoustafaS18-May-05 2:18
MoustafaS18-May-05 2:18 
GeneralC# debugging Pin
methodincharge17-May-05 10:34
methodincharge17-May-05 10:34 
GeneralRe: C# debugging Pin
Judah Gabriel Himango17-May-05 11:01
sponsorJudah Gabriel Himango17-May-05 11:01 
GeneralRe: C# debugging Pin
Tom Larsen17-May-05 12:23
Tom Larsen17-May-05 12:23 
GeneralRe: C# debugging Pin
leppie17-May-05 13:54
leppie17-May-05 13:54 
GeneralRe: C# debugging Pin
Tom Larsen18-May-05 4:43
Tom Larsen18-May-05 4:43 
QuestionHelp... ...please? Pin
Anthony Mushrow17-May-05 9:31
professionalAnthony Mushrow17-May-05 9:31 

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.