Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
AnswerRe: Custom Wizard: Is it possible to add a dll reference to a project on creation from a custom wizard? Pin
Rolando CC30-Apr-09 7:16
professionalRolando CC30-Apr-09 7:16 
GeneralRe: Custom Wizard: Is it possible to add a dll reference to a project on creation from a custom wizard? Pin
Jehammon30-Apr-09 7:32
Jehammon30-Apr-09 7:32 
GeneralRe: Custom Wizard: Is it possible to add a dll reference to a project on creation from a custom wizard? Pin
Jehammon1-May-09 3:39
Jehammon1-May-09 3:39 
Questionget realtime data from website Pin
djdjoko30-Apr-09 6:44
djdjoko30-Apr-09 6:44 
GeneralRe: get realtime data from website Pin
Rolando CC30-Apr-09 7:19
professionalRolando CC30-Apr-09 7:19 
GeneralRe: get realtime data from website Pin
djdjoko30-Apr-09 22:51
djdjoko30-Apr-09 22:51 
GeneralRe: get realtime data from website Pin
SimpleData1-May-09 0:21
SimpleData1-May-09 0:21 
QuestionHow to use a function pointer in C# Pin
Member 103390730-Apr-09 5:04
Member 103390730-Apr-09 5:04 
Hi
In my program I call a win32 API function which returns a function pointer as its result. How can I store and 'call' this pointer in C#?

The API function in question is LRESULT SendMessage(...), which I map as IntPtr SendMessage(...). The function whose pointer is returned by SendMessage has the form

int fn(void*, int);

so I created a delegate

delegate int RemoteFunction(IntPtr a, int b)

and I try to convert the IntPtr (originally LRESULT) returned by SendMessage to an 'instance' of this delegate, like

RemoteFunction x = (RemoteFunction) SendMessage(...); // compiler error

So far I wasn't able to come up with a code that would at least compile, not to mention work.

Do you have any suggestions?
Any help appreciated, H.
AnswerRe: How to use a function pointer in C# Pin
Rolando CC30-Apr-09 6:38
professionalRolando CC30-Apr-09 6:38 
GeneralRe: How to use a function pointer in C# Pin
Member 103390730-Apr-09 22:49
Member 103390730-Apr-09 22:49 
AnswerRe: How to use a function pointer in C# Pin
MidwestLimey30-Apr-09 6:41
professionalMidwestLimey30-Apr-09 6:41 
GeneralRe: How to use a function pointer in C# Pin
Member 103390730-Apr-09 22:50
Member 103390730-Apr-09 22:50 
QuestionReuse existing MFC project in C# Pin
Katherine Williams30-Apr-09 5:00
Katherine Williams30-Apr-09 5:00 
AnswerRe: Reuse existing MFC project in C# Pin
Henry Minute30-Apr-09 5:34
Henry Minute30-Apr-09 5:34 
AnswerRe: Reuse existing MFC project in C# Pin
S. Senthil Kumar30-Apr-09 9:39
S. Senthil Kumar30-Apr-09 9:39 
QuestionDynamic XML Serialiser Pin
BASONJS30-Apr-09 4:23
BASONJS30-Apr-09 4:23 
QuestionBlog site using asp.net 2.0/C# Pin
Member 383476030-Apr-09 2:44
Member 383476030-Apr-09 2:44 
AnswerRe: Blog site using asp.net 2.0/C# Pin
ATCsharp30-Apr-09 2:46
ATCsharp30-Apr-09 2:46 
AnswerRe: Blog site using asp.net 2.0/C# Pin
dan!sh 30-Apr-09 2:51
professional dan!sh 30-Apr-09 2:51 
AnswerRe: Blog site using asp.net 2.0/C# Pin
saanj30-Apr-09 3:07
saanj30-Apr-09 3:07 
Question.NET Remoting - Auto Start Service Object Pin
ATCsharp30-Apr-09 2:31
ATCsharp30-Apr-09 2:31 
AnswerRe: .NET Remoting - Auto Start Service Object Pin
ATCsharp30-Apr-09 3:45
ATCsharp30-Apr-09 3:45 
QuestionMp3 Player Pin
sagiklan30-Apr-09 2:17
sagiklan30-Apr-09 2:17 
AnswerRe: Mp3 Player Pin
DaveyM6930-Apr-09 2:20
professionalDaveyM6930-Apr-09 2:20 
AnswerRe: Mp3 Player Pin
Alaa' Al Atrash30-Apr-09 2:35
Alaa' Al Atrash30-Apr-09 2:35 

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.