In a component I'm writing, I'm loading a DLL which needs to call a function in my component. I've got this working with a global function but I would rather the function be a method inside an object so I can have access to my objects data when the call is made.
With some investigation, I thought I could do this: DLLOpen := TMethod(Open).Code; <<< Invalid typecast Open is a function defined in my object. DLLOpen is the function pointer defined in the DLL which I assign to the method code pointer. I'm not sure why this doesn't work. I'm currently using global variables with a global function, but I would much rather not. Thanks, Ross. _______________________________________________ Delphi mailing list -> Delphi@elists.org http://www.elists.org/mailman/listinfo/delphi