SCOUG-Programming Mailing List Archives
Return to [ 10 |
September |
2005 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Steven, thank you for your help.
On Sat, 10 Sep 2005 09:35:31 PDT7, Steven Levine wrote:
>Since you never supplied snippets of the failing code or stated any goa=
l
>beyond getting a clean build of your code, I have to guess you are tryi=
ng
>to use WPS code in a PM application. That will not work. To proceed
>further, you are going to have to explain what you are really trying to=
>do.
What I'm trying do to is write c-code for a commandline executable progr=
am (compiled
and created by the Watcom compiler). I want the executable to return the=
"ProgDetails"
of a WPPROGRAM object instance (a WPPROGRAM object on my desktop).
The IDE log simply says:
Error! E2038:_wpQueryProgDetails_ is an undefined reference
Error! E2038:_wpAllocMem_ is an undefined reference
file wpQueryProgDetails.obj(...,): undefined symbol _wpQueryProgDetails_=
file wpQueryProgDetails.obj(...,): undefined symbol _wpAllocMem_
Here's my code for WpQueryProgDetails.c:
/*Begin include statements*/
/*#define INCL_WINWORKPLACE Should this be in a header file,
somewhere????*/
#include "os2.h"
#include "WpQueryProgDetailssvc.h"
/*#include */
#include
/*End include statements*/
char *Self =3D ""; /*Remove this one after I
figure out about the WPProgram data type*/
BOOL RC; /*Success indicator for _wpQueryProgDetails*/
PROGDETAILS *pProgDetails; /*Pointer to the program details*/
ULONG ulSize; /*Size of the pProgDetails buffer*/
BYTE pbNewMem; /*Success indicator for _wpAllocMem*/
ULONG cbBytes; /*Specifies the size, in bytes, of memory
required*/
PULONG *prc; /*Pointer to error code*/
/*End variable declarations*/
/*Begin variable assignments*/
/**Self =3D "";*/
/*End variable assignments*/
int main()
{
/* Get information about a program object */
if (_wpQueryProgDetails(Self, NULL, &ulSize))
{
if (_wpAllocMem(Self, ulSize, NULL) !=3D NULL)
{
if ((_wpQueryProgDetails(Self, pProgDetails, &ulSize)))
{
printf("_wpQueryProgDetails reports:\n");
printf(" pszExecutable =3D %s\n", *pProgDetails);
}
else
{
printf("_wpQueryProgDetails - unable to get
details.\n");
return 1;
}
}
else
{
printf("_wpAllocMem error\n");
return 1;
}
}
else
{
printf("_wpQueryProgDetails - unable to determine size for buffer.\n")=
;
return 0;
}
return 0;
}
I also have a header file, which I won't give here right now.
Thanks for your help.
HCM
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"postmaster@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 10 |
September |
2005 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|