Category : OS/2 Files
Archive   : WPSTOOLS.ZIP
Filename : MAKEOBJ.C

 
Output of file : MAKEOBJ.C contained in archive : WPSTOOLS.ZIP
/* Makeobj.c -- create WPS object
usage:
MAKEOBJ Classname Title Location [setupstring]
By Ned Konz 3/14/92
*/

#include

#define INCL_WINWORKPLACE
#include

/*
HOBJECT APIENTRY WinCreateObject(PSZ pszClassName,
PSZ pszTitle,
PSZ pszSetupString,
PSZ pszLocation,
ULONG ulFlags );
#define CO_FAILIFEXISTS 1
#define CO_REPLACEIFEXISTS 2
#define CO_UPDATEIFEXISTS 4

BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
PSZ pszSetupString);

BOOL APIENTRY WinDestroyObject(HOBJECT hObject);

HOBJECT APIENTRY WinQueryObject(PSZ pszObjectID);
*/

int main( int argc, char *argv[] )
{
HOBJECT hobject;

if (argc < 4) {
fputs("Usage: ", stderr);
fputs(argv[0], stderr);
fputs(" Classname Title Location [setupstring]\n", stderr);
return 1;
}

hobject = WinCreateObject((PSZ)argv[1],
(PSZ)argv[2],
(PSZ)((argc > 4) ? argv[4] : NULL),
(PSZ)argv[3],
CO_FAILIFEXISTS );

if (! hobject)
fputs("WinCreateObject failed\n", stderr);

return !hobject;
}


  3 Responses to “Category : OS/2 Files
Archive   : WPSTOOLS.ZIP
Filename : MAKEOBJ.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/