Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralRead from a used file. Pin
adonis.damian21-Jul-05 19:53
adonis.damian21-Jul-05 19:53 
GeneralRe: Read from a used file. Pin
MihirV22-Jul-05 0:06
MihirV22-Jul-05 0:06 
GeneralRe: Read from a used file. Pin
Dave Kreskowiak22-Jul-05 4:41
mveDave Kreskowiak22-Jul-05 4:41 
GeneralOnly one copy of application allowed to run Pin
Anonymous21-Jul-05 19:13
Anonymous21-Jul-05 19:13 
GeneralRe: Only one copy of application allowed to run Pin
Andrew Kirillov22-Jul-05 0:27
Andrew Kirillov22-Jul-05 0:27 
GeneralRe: Only one copy of application allowed to run Pin
MihirV22-Jul-05 0:40
MihirV22-Jul-05 0:40 
Generalchecking MSWord version Pin
ppp00121-Jul-05 17:59
ppp00121-Jul-05 17:59 
QuestionHow to setup a CDECL callback to C# Delagate Pin
Think RS23221-Jul-05 15:01
Think RS23221-Jul-05 15:01 
I have a Win32 DLL that has a standard _stdcall (WINAPI) exports. I am able to call these fine from C#. One call in particular however has a callback to a CDECL function. How would I set that up? Following is the specific.

Win32 DLL Declaration for function in MyDLL.dll
extern "C" int WINAPI SpecialTimerFunction(int Val, int (*Callback)(int InVal))

C# Declaration
public class MyClass
{
public delegate int MyCallback(int InVal);

[DllImport("MyDLL.dll")]
public static extern int SpecialTimerFunction(int Val,MyCallback Callback);
}

How do I declare the delegate to ensure that the marshaller will understand that the callback is of type CDECL?

Thanks a million.
Berto


WCSC (Willies Computer Software Co)
http://www.wcscnet.com

AnswerRe: How to setup a CDECL callback to C# Delagate Pin
leppie21-Jul-05 22:01
leppie21-Jul-05 22:01 
GeneralRe: How to setup a CDECL callback to C# Delagate Pin
Think RS23224-Jul-05 3:33
Think RS23224-Jul-05 3:33 
GeneralRe: How to setup a CDECL callback to C# Delagate Pin
leppie24-Jul-05 4:21
leppie24-Jul-05 4:21 
GeneralFinding out if Ctrl key is pressed Pin
Luis Alonso Ramos21-Jul-05 14:49
Luis Alonso Ramos21-Jul-05 14:49 
GeneralRe: Finding out if Ctrl key is pressed Pin
Mike Dimmick22-Jul-05 0:10
Mike Dimmick22-Jul-05 0:10 
GeneralRe: Finding out if Ctrl key is pressed Pin
Luis Alonso Ramos22-Jul-05 6:19
Luis Alonso Ramos22-Jul-05 6:19 
Generalsimultte splitter moving effect Pin
Sasuko21-Jul-05 12:50
Sasuko21-Jul-05 12:50 
GeneralRe: simultte splitter moving effect Pin
malharone21-Jul-05 13:11
malharone21-Jul-05 13:11 
GeneralRe: simultte splitter moving effect Pin
Sasuko21-Jul-05 13:14
Sasuko21-Jul-05 13:14 
GeneralRe: simultte splitter moving effect Pin
malharone21-Jul-05 13:21
malharone21-Jul-05 13:21 
GeneralPicture-strange Pin
nc3b21-Jul-05 12:25
nc3b21-Jul-05 12:25 
GeneralRe: Picture-strange Pin
Member 177347421-Jul-05 12:46
Member 177347421-Jul-05 12:46 
GeneralRe: Picture-strange Pin
nc3b21-Jul-05 12:51
nc3b21-Jul-05 12:51 
GeneralRe: Picture-strange Pin
malharone21-Jul-05 13:09
malharone21-Jul-05 13:09 
GeneralRe: Picture-strange Pin
nc3b21-Jul-05 13:14
nc3b21-Jul-05 13:14 
GeneralRe: Picture-strange Pin
malharone21-Jul-05 13:18
malharone21-Jul-05 13:18 
GeneralRe: Picture-strange Pin
nc3b21-Jul-05 21:32
nc3b21-Jul-05 21: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.