Code: Select all
METHOD AboutBox( ) CLASS RRSQLReport
LOCAL oMethod AS cOleMethod
LOCAL uRetValue AS USUAL
oMethod := cOleMethod{}
oMethod:symName := String2Symbol("AboutBox")
oMethod:iMemberid := -552
oMethod:wInvokeKind := INVOKE_METHOD
uRetValue := SELF:oAuto:__Invoke(oMethod, DWORD(_BP+16),PCount())
RETURN (uRetValue)
The DLL is used with _DLL calls like this:
_DLL FUNCTION RRexecRuntime(HReport AS INT, bWait AS INT, FsCmdShow AS INT, eCode AS PTR, pPageCount AS PTR, EMsg AS PSZ, Emsgsize AS INT) AS BYTE PASCAL:RSRPT32.execRuntime
Not surprisingly, adding the OCX (rsw32.ocx) or the DLL (rsrpt32.dll) as a reference in X# results in an error (“Could not load file or assembly ‘rsrpt32.ddl’ or one of its dependencies. The module was expected to contain an assembly manifest.”)
I have several questions about this.
- I have seen "Example 5" in the X# documentation, but this is an entirely different OCX. Will the tricks used here work for any OCX or just for the one in the e-mail sample?
- What is the reason that these components are not supported in X#, is it the fact that they are 32-bit, or is the code unsafe, is it the missing assembly manifest? What would the requirements be for X# support? Would 64-bit ActiveX controls work?
- How can I get the cOleMethod{} code to work in X#, port the source code for this or is there a better way?
- I can't find anywhere what _BP exactly is. In VO it has the colour of "operators". It does not seem to exist in X#.
Many thanks to anyone who can shed some light on it!
Kees.