Hello,
I am attempting to use the Win HLLAPI DLL to copy the presentation
space from an application into my application.
The C function is:
I think it is supposed to be called like:
[quote]
I tried the following in PB, but I always get a SYS ERROR.
I have gotten many functions working, but have been stuck on this
one for a week. If anyone can help, I'd really appreciate it!
-John
------------------
LOCAL MyEMail AS STRING
MyEMail = "jtintel" & CHR$(64) & "gmail" & CHR$(46) & "com"
I am attempting to use the Win HLLAPI DLL to copy the presentation
space from an application into my application.
The C function is:
Code:
void WINAPI WinHLLAPI(LPWORD, LPBYTE, LPWORD, LPWORD);
[quote]
Code:
Function Call WinHLLAPI(COPYPS,lpbyString,lpwLength,lpwReturnnCode) Call Parameters Parameter Description Data String String that will contain the Host session presentation space. The string length must be defined as the maximum size of the presentation space. If the session option EAB has been set with Set Session Parameters (function 9), the string length must be defined to be at least twice the size of the presentation space. Data Length NA (the length of the presentation space is assumed). PS Position NA Return Parameters Parameter Description Data String String containing the Host session presentation space. </font>
Code:
FUNCTION CopyPS () AS STRING LOCAL sPS AS ASCIIZ * 1921 (1920 + 1 null) LOCAL lLength AS INTEGER LOCAL lRC AS INTEGER lLength = 0 lRC = 0 'Send the request to copy the presentation space. WinHLLAPI (%COPYPS, BYVAL sPS, lLength, lRC) PRINT "lLength:" & STR$(lLength) '= 0, but should be 1920. PRINT "lRC:" & STR$(lRC) '= 9 for WHLSYSERROR 'Check the return code. SELECT CASE lRC CASE %WHLLOK PRINT "ok" CASE %WHLLNOTCONNECTED PRINT "notconnected" CASE %WHLLPSBUSY PRINT "ps busy" CASE %WHLLINHIBITED PRINT "inhibited" CASE %WHLLSYSERROR PRINT "sys error" END SELECT 'Return the presentation space. FUNCTION = sPS END FUNCTION
one for a week. If anyone can help, I'd really appreciate it!
-John
------------------
LOCAL MyEMail AS STRING
MyEMail = "jtintel" & CHR$(64) & "gmail" & CHR$(46) & "com"
Comment