SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, 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.

The Southern California OS/2 User Group
USA

SCOUG-Programming Mailing List Archives

Return to [ 10 | September | 2005 ]

<< Previous Message << >> Next Message >>


Date: Sat, 10 Sep 2005 11:03:41 PDT7
From: "Harry Motin" <hmotin@sbcglobal.net >
Reply-To: scoug-programming@scoug.com
To: < "scoug-programming@scoug.com" > scoug-programming@scoug.com >
Subject: SCOUG-Programming: OS/2 Toolkit Programming and Watcom

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.