这篇教程C++ DosLoadModule函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DosLoadModule函数的典型用法代码示例。如果您正苦于以下问题:C++ DosLoadModule函数的具体用法?C++ DosLoadModule怎么用?C++ DosLoadModule使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DosLoadModule函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: vptextc_somInitClassSOM_Scope void SOMLINK vptextc_somInitClass(M_VPText *somSelf, IN zString className, IN SOMAny *parentClass, IN integer4 instanceSize, IN int maxStaticMethods, IN integer4 majorVersion, IN integer4 minorVersion){ M_VPTextData *somThis = M_VPTextGetData(somSelf); CHAR ErrorBuffer[100]; M_VPTextMethodDebug("M_VPText","vptextc_somInitClass"); DosLoadModule((PSZ) ErrorBuffer, sizeof(ErrorBuffer), "VPText", &_hModResource); WinRegisterClass( /* Register window class */ 0, /* Anchor block handle */ szClass, /* Window class name */ TestWndProc, /* Address of window procedure */ 0, /* Class style */ 12 /* No extra window words */ ); parent_somInitClass(somSelf,className,parentClass,instanceSize, maxStaticMethods,majorVersion,minorVersion);}
开发者ID:OS2World,项目名称:DEV-SAMPLES-VisProREXX_SOM_Toolkit,代码行数:25,
示例2: DrvMountDrivesThreadvoid DrvMountDrivesThread( void * hev){ ULONG rc; HMODULE hmod = 0; pRediscover_PRMs pfn = 0; char * pErr = 0; char szErr[16]; rc = DosLoadModule( szErr, sizeof(szErr), "LVM", &hmod); if (rc) pErr = "DosLoadModule"; else { rc = DosQueryProcAddr( hmod, 0, "Rediscover_PRMs", (PFN*)&pfn); if (rc) pErr = "DosQueryProcAddr"; else { pfn( &rc); if (rc) pErr = "Rediscover_PRMs"; } rc = DosFreeModule( hmod); if (rc && !pErr) pErr = "DosFreeModule"; } if (pErr) printf( "DrvMountDrivesThread - %s - rc= %lx/n", pErr, rc); rc = DosPostEventSem( (HEV)hev); if (rc) printf( "DrvMountDrivesThread - DosPostEventSem - rc= %lx/n", rc); return;}
开发者ID:OS2World,项目名称:APP-GRAPHICS-Cameraderie,代码行数:35,
示例3: GA_getSharedInfo/****************************************************************************REMARKS:This function returns a pointer to the common graphics driver loaded in thehelper VxD. The memory for the VxD is shared between all processes viathe VxD, so that the VxD, 16-bit code and 32-bit code all see the samestate when accessing the graphics binary portable driver.****************************************************************************/GA_sharedInfo * NAPI GA_getSharedInfo( int device){ /* Initialise the PM library and connect to our runtime DLL's */ PM_init(); /* Open our helper device driver */ if (DosOpen(PMHELP_NAME,&hSDDHelp,&result,0,0, FILE_OPEN, OPEN_SHARE_DENYNONE | OPEN_ACCESS_READWRITE, NULL)) PM_fatalError("Unable to open SDDHELP$ helper device driver!"); outLen = sizeof(result); DosDevIOCtl(hSDDHelp,PMHELP_IOCTL,PMHELP_GETSHAREDINFO, NULL, 0, NULL, &result, outLen, &outLen); DosClose(hSDDHelp); if (result) { /* We have found the shared Nucleus packet. Because not all processes * map to SDDPMI.DLL, we need to ensure that we connect to this * DLL so that it gets mapped into our address space (that is * where the shared Nucleus packet is located). Simply doing a * DosLoadModule on it is enough for this. */ HMODULE hModSDDPMI; char buf[80]; DosLoadModule((PSZ)buf,sizeof(buf),(PSZ)"SDDPMI.DLL",&hModSDDPMI); } return (GA_sharedInfo*)result;}
开发者ID:A1DEVS,项目名称:lenovo_a1_07_uboot,代码行数:36,
示例4: _catcher/* *************************************************************** */void _catcher(bundle s){ char msg[512]; char *b[4]; HMODULE hmod; PFNWP DlgProc; int c = 0, bx = 0; if (msgHead != NULL) { for (msg[0] = '/0'; *msgHead != NULL; ++msgHead) strcat(msg,*msgHead); b[bx++] = msg; c = strlen(msg) + 1; } for (msg[c] = '/0'; *s != NULL; ++s) strcat(&msg[c],*s); b[bx++] = &msg[c]; b[bx++] = "Application will terminate now"; b[bx] = NULL; if (DosLoadModule(NULL, 0, "GPRTS", &hmod) || DosQueryProcAddr(hmod, 0, "DlgProc", (PFN *)&DlgProc)) WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, "Unable to load error message","GPM Fatal Error", 0, MB_ICONHAND | MB_OK); else { WinAlarm(HWND_DESKTOP, WA_ERROR); WinDlgBox(HWND_DESKTOP, HWND_DESKTOP, DlgProc, hmod, GPRTS_DLG, b); DosFreeModule(hmod); } DosExit(EXIT_PROCESS, 0);}
开发者ID:2nickpick,项目名称:c-minus,代码行数:32,
示例5: DosLoadModule/*** Interfaces for opening a shared library, finding entry points** within the shared library, and closing the shared library.*/static void *os2DlOpen(sqlite3_vfs *pVfs, const char *zFilename){ UCHAR loadErr[256]; HMODULE hmod; APIRET rc; rc = DosLoadModule((PSZ)loadErr, sizeof(loadErr), zFilename, &hmod); return rc != NO_ERROR ? 0 : (void*)hmod;}
开发者ID:soubok,项目名称:libset,代码行数:11,
示例6: LoadModuleAPIRET LoadModule(PSZ pszModuleName, PHMODULE phModule){ APIRET rc; /* operation return code */ char pszBuffer[512]; /* module name buffer in case of failure */ HMODULE hModule; /* load result buffer for module handle */ if (NULL == phModule) /* check if module handle is desired */ phModule = &hModule; /* point to local buffer, forget after return */ pszBuffer[0] = 0; /* prevent previous results from disturbing */ rc = DosLoadModule(pszBuffer, sizeof(pszBuffer), pszModuleName, phModule); if (rc != NO_ERROR) { if (pszBuffer[0] != 0) ToolsErrorDosEx(rc, /* display error message */ pszBuffer); else ToolsErrorDos(rc); } return rc; /* OK */}
开发者ID:OS2World,项目名称:DEV-UTIL-OS2Tools,代码行数:26,
示例7: _PR_MD_INIT_IOvoid_PR_MD_INIT_IO(){ APIRET rc; HMODULE module; sock_init(); rc = DosLoadModule(NULL, 0, "DOSCALL1", &module); if (rc != NO_ERROR) { return; } rc = DosQueryProcAddr(module, 981, NULL, (PFN*) &myDosOpenL); if (rc != NO_ERROR) { return; } rc = DosQueryProcAddr(module, 986, NULL, (PFN*) &myDosSetFileLocksL); if (rc != NO_ERROR) { return; } rc = DosQueryProcAddr(module, 988, NULL, (PFN*) &myDosSetFilePtrL); if (rc != NO_ERROR) { return; } isWSEB = PR_TRUE;}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:30,
示例8: WtkLoadNlsResourceModuleAPIRET APIENTRY WtkLoadNlsResourceModule( PFN pfnMod, PHMODULE phmod, PSZ pszDefaultLanguage, PSZ pszEnvVar, PSZ pszFileMaskPath){ APIRET rc = NO_ERROR; CHAR szLanguageModule[ _MAX_PATH]; CHAR szError[ 20];do { // determine filename rc = WtkGetNlsPackageFilename( pfnMod, pszDefaultLanguage, pszEnvVar, pszFileMaskPath, szLanguageModule, sizeof( szLanguageModule)); if (rc != NO_ERROR) break; // load resource file rc = DosLoadModule( szError, sizeof( szError), szLanguageModule, phmod); if (rc != NO_ERROR) break; } while (FALSE);return rc;}
开发者ID:OS2World,项目名称:LIB-WPS-wpstk,代码行数:25,
示例9: wxASSERT_MSGbool wxDynamicLibrary::Load(const wxString& libnameOrig, int flags){ wxASSERT_MSG(m_handle == 0, _T("Library already loaded.")); // add the proper extension for the DLL ourselves unless told not to wxString libname = libnameOrig; if ( !(flags & wxDL_VERBATIM) ) { // and also check that the libname doesn't already have it wxString ext; wxFileName::SplitPath(libname, NULL, NULL, &ext); if ( ext.empty() ) { libname += GetDllExt(); } } // different ways to load a shared library // // FIXME: should go to the platform-specific files!#if defined(__WXMAC__) && !defined(__DARWIN__) FSSpec myFSSpec; Ptr myMainAddr; Str255 myErrName; wxMacFilename2FSSpec( libname , &myFSSpec ); if( GetDiskFragment( &myFSSpec, 0, kCFragGoesToEOF, "/p", kPrivateCFragCopy, &m_handle, &myMainAddr, myErrName ) != noErr ) { wxLogSysError( _("Failed to load shared library '%s' Error '%s'"), libname.c_str(), wxMacMakeStringFromPascal( myErrName ).c_str() ); m_handle = 0; }#elif defined(__WXPM__) || defined(__EMX__) char err[256] = ""; DosLoadModule(err, sizeof(err), (PSZ)libname.c_str(), &m_handle);#else m_handle = RawLoad(libname, flags);#endif if ( m_handle == 0 ) {#ifdef wxHAVE_DYNLIB_ERROR Error();#else wxLogSysError(_("Failed to load shared library '%s'"), libname.c_str());#endif } return IsLoaded();}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:60,
示例10: ReloadResourcesBOOL Settings :: ReloadResources (PSZ psz){ if (g_hmod) DosFreeModule(g_hmod); APIRET rc; if ((rc = DosLoadModule(PSZ(NULL), 0, psz, &g_hmod))) { DisplayError("ERROR", "Could not (re)load Gotcha! resource module " "'%s' (DosLoadModule() return code %d). First make sure the DLL is in the LIBPATH. If this is the case, try to delete " "GOTCHA.INI and start Gotcha! again. If it does not work " "then, contact the author ([email C++ DosOpen函数代码示例 C++ DosGetInfoBlocks函数代码示例
|