Create Function Pointer from IntPr

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all.

I'm working with the Tao OpenGL libraries for C# but ran into a problem
getting a function to work.

What I've done is:

// Set current context
Wgl.wglMakeCurrent(hDC, hRC);

// get entry point of the function
IntPtr pfnColorTableEXT = Wgl.wglGetProcAddress("glColorTableEXT");

// I have a value other than Zero at this point.
// How do I create a delegate or function pointer to this entry point?


Any help would be appreciated.

Dennis
 
check out this for info

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconusingcallbackfunctions.asp

and check this out for the answer

http://groups.google.co.uk/groups?hl=en&lr=&threadm=OZyE15aoEHA.2300@TK2MS
FTNGP10.phx.gbl&rnum=1&prev=/groups%3Fq%3Ddelegate%2520from%2520IntPtr%26hl%
3Den%26lr%3D%26sa%3DN%26tab%3Dwg

cool code or what :)


--
HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
 
realised that after I hit 'send' :)

Ollie

Mattias Sjögren said:
S
%

Except that what the original poster was asking for was the opposite;
getting a delegate from a function pointer. That's non-trivial to do
in v1.x but easy in v2.0.



Mattias
 
Back
Top