LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Jul 1999 11:55:21 +0200
Reply-To:     Bart.Heinsius@eomdata.nl
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bart Heinsius <Bart.Heinsius@EOMDATA.NL>
Subject:      Re: Calling API functions with ModuleN
Comments: To: Benjamin Guralnik <guralnik@ISDN.NET.IL>
In-Reply-To:  <000c01bed2ca$f3b673c0$22e975c0@guralnik>
Content-Type: multipart/alternative;

Hi Benjamin,

USER32.DLL exports the WinHelpA function, not WinHelp.

Cheers, Bart Heinsius E.O.M. Data Hilversum, the Netherlands -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Benjamin Guralnik Sent: dinsdag 20 juli 1999 18:06 To: SAS-L@LISTSERV.UGA.EDU Subject: Calling API functions with ModuleN

Hi everybody!

I'm having a trouble with calling the WinHelp API function from SAS (using ModuleN.) I got an impression that long long time ago, these module functions had been extensively discussed here, but unfortunately I was not subscribed to the list then. Looking at the archives didn't exactly solve my problem, so that I decided to post it anyway.

Here are the two definitions of WinHelp that I found on MSDN site:

----------------------------------------------------------------------------

1. Excerpt from the WIN32 API reference:

WinHelp Starts Microsoft® Windows® Help (Winhelp.exe) and passes additional data indicating the nature of the Help requested by the application.

BOOL WinHelp( HWND hWndMain, LPCTSTR lpszHelp, UINT uCommand, DWORD dwData);

2. ...and a Visual Basic declaration:

Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, ByVal dwData As Any) As Integer

----------------------------------------------------------------------------

According to this, I constructed the Atribute Table: (The GetActiveWindow routine is needed for the hWnd value passed to WinHelp, and is shown in SAS System Help under Grouping SAS Variables as Structure Arguments)

routine GetActiveWindow minarg=0 maxarg=0 stackpop=called module=USER32 returns=ushort;

routine WinHelp minarg=4 maxarg=4 stackpop=called module=USER32 returns=ulong; arg 1 num input byvalue format=pib4.; arg 2 char input format = $cstr50.; arg 3 num input format=pib4.; arg 4 num input ;

Well, the problem is, WinHelp routine simply *refuses* work. Neither in Base SAS, nor in SCL. Here's the code:

rc=FILENAME('sascbtbl','c:\sas\winhelp.txt'); hWnd=MODULEN('*i','GetActiveWindow'); put hWnd=; k = MODULEN('*i', 'WinHelp', hWnd, 'c:\sas\core\winhelp\sascomp.hlp', 11, 0);

...And Here are the two messages I get:

NOTE: Routine WinHelp of module USER32 could not be loaded. NOTE: Argument to function MODULEN is invalid at line 28.

Have I missed anything?

Thanks in advance, and any help will be really appreciated,

Benjamin


[text/html]


Back to: Top of message | Previous page | Main SAS-L page