ZhangZQ
10/31/2003 3:04:00 AM
Thanks,
In C the GetProcAddress can get the function pointer, for example
typedef int (*MYADD)(int, int);
MYADD add = (MYADD) GetProcAddress(hMyLib, "add");
but how to pass the function pointer to that delegate?
Thank you very much again!
"Chris Taylor" <chris_taylor_za@hotmail.com> wrote in message
news:Of5RPn1nDHA.2592@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> You would use a delegate.
>
> delegate int AddCallback( int a, int b );
>
> Hope this helps
>
> Chris Taylor
>
> "ZhangZQ" <zhangzq71@hotmail.com> wrote in message
> news:eNOeZg1nDHA.2432@TK2MSFTNGP10.phx.gbl...
> > if there is a function in a win32 dll, it is definition is
> >
> > int add(int a, int b);
> >
> >
> > how to define that function pointer in C#?
> >
> >
> > thank you very much!
> >
> >
>
>