您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DosQueryProcAddr函数代码示例

51自学网 2021-06-01 20:29:39
  C++
这篇教程C++ DosQueryProcAddr函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DosQueryProcAddr函数的典型用法代码示例。如果您正苦于以下问题:C++ DosQueryProcAddr函数的具体用法?C++ DosQueryProcAddr怎么用?C++ DosQueryProcAddr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DosQueryProcAddr函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: hb_isWSeB

HB_BOOL hb_isWSeB( void ){   static int s_iWSeB = -1;   if( s_iWSeB < 0 )   {      APIRET ret;      HMODULE hModule;      /* what is the suggested form? [druzus] */#if 1      ret = DosQueryModuleHandle( ( PCSZ ) "DOSCALLS", &hModule );#else      ret = DosLoadModule( NULL, 0, ( PCSZ ) "DOSCALL1", &hModule );#endif      if( ret == NO_ERROR )         ret = DosQueryProcAddr( hModule, 981, NULL, ( PFN * ) &s_DosOpenL );      if( ret == NO_ERROR )         ret = DosQueryProcAddr( hModule, 986, NULL, ( PFN * ) &s_DosSetFileLocksL );      if( ret == NO_ERROR )         ret = DosQueryProcAddr( hModule, 988, NULL, ( PFN * ) &s_DosSetFilePtrL );      if( ret == NO_ERROR )         ret = DosQueryProcAddr( hModule, 989, NULL, ( PFN * ) &s_DosSetFileSizeL );      s_iWSeB = ret == NO_ERROR;   }   return s_iWSeB;}
开发者ID:jiangxilong,项目名称:core,代码行数:27,


示例2: InitializeXPIStub

APIRET InitializeXPIStub(){  char szBuf[MAX_BUF];  char szXPIStubFile[MAX_BUF];  hXPIStubInst = NULL;  /* get full path to xpistub.dll */  if(DosQueryPathInfo("xpistub.dll", sizeof(szXPIStubFile), szXPIStubFile, NULL) == FALSE)    PrintError("File not found: xpistub.dll", ERROR_CODE_SHOW, 2);  /* load xpistub.dll */  if((DosLoadModule(&szBuf, sizeof(szBuf), szXPIStubFile, &hXPIStubInst)) != NO_ERROR)  {    sprintf(szBuf, "Error loading library: %s/n", szXPIStubFile);    PrintError(szBuf, ERROR_CODE_SHOW, 1);  }  if((pfnXpiInit = DosQueryProcAddr(hXPIStubInst, 1L, NULL,"XPI_Init")) == NULL)  {    sprintf(szBuf, "DosQueryProcAddr() failed: XPI_Init/n");    PrintError(szBuf, ERROR_CODE_SHOW, 1);  }  if((pfnXpiInstall = DosQueryProcAddr(hXPIStubInst, 1L, NULL,"XPI_Install")) == NULL)  {    sprintf(szBuf, "DosQueryProcAddr() failed: XPI_Install/n");    PrintError(szBuf, ERROR_CODE_SHOW, 1);  }  if((pfnXpiExit = DosQueryProcAddr(hXPIStubInst, 1L, NULL,"XPI_Exit")) == NULL)  {    sprintf(szBuf, "DosQueryProcAddr() failed: XPI_Exit/n");    PrintError(szBuf, ERROR_CODE_SHOW, 1);  }  return(0);}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:35,


示例3: _PR_MD_INIT_IO

void_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,


示例4: File64bit

/* * Initialize 64bit file access: dynamic load of WSeB API*/	    File64bit :: File64bit(){   HMODULE hDoscalls;   if (DosQueryModuleHandle("DOSCALLS", &hDoscalls) != NO_ERROR)      return;   if (DosQueryProcAddr(hDoscalls, 981, NULL, (PFN *)&_DosOpenL) != NO_ERROR)      return;   if (DosQueryProcAddr(hDoscalls, 988, NULL, (PFN *)&_DosSetFilePtrL) != NO_ERROR) {      _DosOpenL = NULL;      return;   }   if (DosQueryProcAddr(hDoscalls, 986, NULL, (PFN *)&_DosSetFileLocksL) != NO_ERROR) {      _DosOpenL = NULL;      _DosSetFilePtrL = NULL;      return;   }   /* notify success */#ifdef MYSQL_SERVER   printf( "WSeB 64bit file API loaded./n");#endif}
开发者ID:OPSF,项目名称:uClinux,代码行数:28,


示例5: InitSoftDebug

VOID InitSoftDebug(VOID){    // Create the thread creation event sem and load the queue hook DLL    DosCreateEventSem( NULL, &BeginThreadSem, 0, FALSE );    DosLoadModule( NULL, 0, HOOKER, &HookDLL );    DosQueryProcAddr( HookDLL, 0, "SendMsgHookProc", (PFN*)&PSendMsgHookProc );    DosQueryProcAddr( HookDLL, 0, "SetHmqDebugee", (PFN*)&PSetHmqDebugee );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:8,


示例6: memcpy

char *LoadTrap( const char *parms, char *buff, trap_version *trap_ver ){    char                trpfile[CCHMAXPATH];    unsigned            len;    const char          *ptr;    APIRET              rc;    char                trpname[CCHMAXPATH] = "";    char                trppath[CCHMAXPATH] = "";    trap_init_func      *init_func;    if( parms == NULL || *parms == '/0' )        parms = "std";    for( ptr = parms; *ptr != '/0' && *ptr != TRAP_PARM_SEPARATOR; ++ptr )        ;    len = ptr - parms;    memcpy( trpfile, parms, len );    trpfile[len] = '/0';    /* To prevent conflicts with the 16-bit DIP DLLs, the 32-bit versions have the "D32"     * extension. We will search for them along the PATH (not in LIBPATH);     */    strcpy( trpname, trpfile );    strcat( trpname, ".D32" );    _searchenv( trpname, "PATH", trppath );    if( trppath[0] == '/0' ) {        sprintf( buff, TC_ERR_CANT_LOAD_TRAP, trpname );        return( buff );    }    rc = DosLoadModule( NULL, 0, trppath, &TrapFile );    if( rc != 0 ) {        sprintf( buff, TC_ERR_CANT_LOAD_TRAP, trppath );        return( buff );    }    strcpy( buff, TC_ERR_WRONG_TRAP_VERSION );    if( DosQueryProcAddr( TrapFile, 1, NULL, (PFN*)&init_func ) == 0      && DosQueryProcAddr( TrapFile, 2, NULL, (PFN*)&FiniFunc ) == 0      && DosQueryProcAddr( TrapFile, 3, NULL, (PFN*)&ReqFunc ) == 0 ) {        if( DosQueryProcAddr( TrapFile, 4, NULL, (PFN*)&InfoFunc ) != 0 ) {            InfoFunc = NULL;        }        if( DosQueryProcAddr( TrapFile, 5, NULL, (PFN*)&HardFunc ) != 0 ) {            HardFunc = NULL;        }        parms = ptr;        if( *parms != '/0' )            ++parms;        *trap_ver = init_func( parms, buff, trap_ver->remote );        if( buff[0] == '/0' ) {            if( TrapVersionOK( *trap_ver ) ) {                TrapVer = *trap_ver;                return( NULL );            }            strcpy( buff, TC_ERR_WRONG_TRAP_VERSION );        }    }    KillTrap();    return( buff );}
开发者ID:MikeyG,项目名称:open-watcom-v2,代码行数:58,


示例7: USBProxyBackend

/** * Initialize data members. */USBProxyBackendOs2::USBProxyBackendOs2(USBProxyService *aUsbProxyService, const com::Utf8Str &strId)    : USBProxyBackend(aUsbProxyService, strId), mhev(NULLHANDLE), mhmod(NULLHANDLE),    mpfnUsbRegisterChangeNotification(NULL), mpfnUsbDeregisterNotification(NULL),    mpfnUsbQueryNumberDevices(NULL), mpfnUsbQueryDeviceReport(NULL){    LogFlowThisFunc(("aUsbProxyService=%p/n", aUsbProxyService));    /*     * Try initialize the usbcalls stuff.     */    int rc = DosCreateEventSem(NULL, &mhev, 0, FALSE);    rc = RTErrConvertFromOS2(rc);    if (RT_SUCCESS(rc))    {        rc = DosLoadModule(NULL, 0, (PCSZ)"usbcalls", &mhmod);        rc = RTErrConvertFromOS2(rc);        if (RT_SUCCESS(rc))        {            if (    (rc = DosQueryProcAddr(mhmod, 0, (PCSZ)"UsbQueryNumberDevices",         (PPFN)&mpfnUsbQueryNumberDevices))          == NO_ERROR                &&  (rc = DosQueryProcAddr(mhmod, 0, (PCSZ)"UsbQueryDeviceReport",          (PPFN)&mpfnUsbQueryDeviceReport))           == NO_ERROR                &&  (rc = DosQueryProcAddr(mhmod, 0, (PCSZ)"UsbRegisterChangeNotification", (PPFN)&mpfnUsbRegisterChangeNotification))  == NO_ERROR                &&  (rc = DosQueryProcAddr(mhmod, 0, (PCSZ)"UsbDeregisterNotification",     (PPFN)&mpfnUsbDeregisterNotification))      == NO_ERROR               )            {                rc = mpfnUsbRegisterChangeNotification(&mNotifyId, mhev, mhev);                if (!rc)                {                    /*                     * Start the poller thread.                     */                    rc = start();                    if (RT_SUCCESS(rc))                    {                        LogFlowThisFunc(("returns successfully - mNotifyId=%d/n", mNotifyId));                        mLastError = VINF_SUCCESS;                        return;                    }                }                LogRel(("USBProxyServiceOs2: failed to register change notification, rc=%d/n", rc));            }            else                LogRel(("USBProxyServiceOs2: failed to load usbcalls/n"));            DosFreeModule(mhmod);        }        else            LogRel(("USBProxyServiceOs2: failed to load usbcalls, rc=%d/n", rc));        mhmod = NULLHANDLE;    }    else        mhev = NULLHANDLE;    mLastError = rc;    LogFlowThisFunc(("returns failure!!! (rc=%Rrc)/n", rc));}
开发者ID:svn2github,项目名称:virtualbox,代码行数:59,


示例8: if

bool XIOfile64::supported(){ if (!checked64)  { HMODULE hmod;    if ( DosQueryModuleHandle("DOSCALLS", &hmod) == NO_ERROR      && DosQueryProcAddr(hmod, 981, NULL, (PFN*)&pOpen) == NO_ERROR      && DosQueryProcAddr(hmod, 988, NULL, (PFN*)&pSetFilePtr) == NO_ERROR      && DosQueryProcAddr(hmod, 989, NULL, (PFN*)&pSetFileSize) == NO_ERROR )      support64 = true;    checked64 = true;  }  return support64;}
开发者ID:OS2World,项目名称:MM-SOUND-PM123,代码行数:12,


示例9: LoadOverlay

// Just put DLL loading into separate functionstatic BOOL LoadOverlay(void){    char szTempStr[ 255 ];    // Load WarpOverlay! API DLL    if( DosLoadModule( szTempStr, sizeof( szTempStr ), "hwvideo", &m_HWVideoHandle ))        return FALSE;    // Get all functions entry points    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOInit", ( PFN * )&m_pfnHWVIDEOInit ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOCaps", ( PFN * )&m_pfnHWVIDEOCaps ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOSetup", ( PFN * )&m_pfnHWVIDEOSetup ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOBeginUpdate", ( PFN * )&m_pfnHWVIDEOBeginUpdate ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOEndUpdate", ( PFN * )&m_pfnHWVIDEOEndUpdate ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOGetAttrib", ( PFN * )&m_pfnHWVIDEOGetAttrib ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOSetAttrib", ( PFN * )&m_pfnHWVIDEOSetAttrib ))        return FALSE;    if( DosQueryProcAddr( m_HWVideoHandle, 0, "HWVIDEOClose", ( PFN * )&m_pfnHWVIDEOClose ))        return FALSE;    return TRUE;}
开发者ID:komh,项目名称:kva,代码行数:36,


示例10: DosQueryProcAddr

static void *os2DlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){  PFN pfn;  APIRET rc;  rc = DosQueryProcAddr((HMODULE)pHandle, 0L, zSymbol, &pfn);  if( rc != NO_ERROR ){    /* if the symbol itself was not found, search again for the same     * symbol with an extra underscore, that might be needed depending     * on the calling convention */    char _zSymbol[256] = "_";    strncat(_zSymbol, zSymbol, 255);    rc = DosQueryProcAddr((HMODULE)pHandle, 0L, _zSymbol, &pfn);  }  return rc != NO_ERROR ? 0 : (void*)pfn;}
开发者ID:erik-knudsen,项目名称:eCos-enhancements,代码行数:14,


示例11: find_id

/* return a pointer to the `symbol' in DLL */void *dlsym(void *handle, char *symbol){    int rc = 0;    PFN addr;    char *errtxt;    int symord = 0;    DLLchain tmp = find_id(handle);    if (!tmp)        goto inv_handle;    if (*symbol == '#')        symord = atoi(symbol + 1);    switch (rc = DosQueryProcAddr(tmp->handle, symord, symbol, &addr))    {        case NO_ERROR:            return (void *)addr;        case ERROR_INVALID_HANDLE:inv_handle:            errtxt = "invalid module handle";            break;        case ERROR_PROC_NOT_FOUND:        case ERROR_INVALID_NAME:            errtxt = "no symbol `%s' in module";            break;        default:            errtxt = "symbol `%s', error code = %d";            break;    }    snprintf(dlerr, sizeof(dlerr), errtxt, symbol, rc);    return NULL;}
开发者ID:0xcc,项目名称:python-read,代码行数:34,


示例12: DrvMountDrivesThread

void        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,


示例13: strdup

void *GetProcAddress (HMODULE hmod, const char *symbol) {    void *addr = NULL;    PFN      ModuleAddr     = 0;    APIRET rc = 0;    HMODULE hmod3 = *hmod2;    //HMODULE hmod3 = hmod;    std::cerr << "DosQueryProcAddr " << symbol << " from module hmod3: " << hmod2 << std::endl;    char *symbol3 = strdup(symbol);    //std::cerr << "DosQueryProcAddr (2) " << symbol2 << " from module hmod3: " << hmod2 << std::endl;    /* Load DLL and get hmod with DosLoadModule*/    /* Get address for process in DLL */    rc = DosQueryProcAddr(hmod3, 0, (PSZ )symbol3, &ModuleAddr);    /*	  return codes:	  0 NO_ERROR	  6 ERROR_INVALID_HANDLE	  123 ERROR_INVALID_NAME	  182 ERROR_INVALID_ORDINAL	  65079 ERROR_ENTRY_IS_CALLGATE (this error code is not valid in OS/2 Warp PowerPC Edition)    */    if(rc) {        // error;#if defined(_OS2_LIBDEBUG)        std::cerr << "DosQueryProcAddr of " << symbol << " from module at " << hmod2 << " failed. " <<  " (ret code: " << rc << ")" << std::endl;#endif    } else {        addr = (void *)ModuleAddr;#if defined(_OS2_LIBDEBUG)        std::cerr << "DosQueryProcAddr " << symbol << " from module at " << hmod2 << " succeeded (addr: " << &ModuleAddr << " ). " << std::endl;#endif    }    return addr;}
开发者ID:stonewell,项目名称:lib7zip,代码行数:35,


示例14: _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,


示例15: InstallPort

BOOL InstallPort(void){//APIRET APIENTRY SplPdInstallPort(HAB hab,PSZ pszPortName)    PFN pfnProcess;    APIRET rc;    sprintf(szMessage,"Installing %s",szPortName);    PrintString(szMessage,3);    if (hMod != 0)    {        if (DosQueryProcAddr(hMod,0,"SPLPDINSTALLPORT",&pfnProcess) == NO_ERROR)            rc = pfnProcess(habAnchorBlock,szPortName);        else        {            ErrorNotify("Error Getting INSTALLPORT Address");            return(FALSE);        }    }    else    {        sprintf(szMessage,"Error Loading Module %s",szModuleName);        ErrorNotify(szMessage);        return(FALSE);    }    if (rc != NO_ERROR)    {        sprintf(szMessage,"Error Installing Port - rc = %X",rc);        ErrorNotify(szMessage);        return(FALSE);    }    sprintf(szMessage,"Port %s Installed",szPortName);    PrintString(szMessage,4);    return(TRUE);}
开发者ID:OS2World,项目名称:APP-COMM-ComScope,代码行数:35,


示例16: _PyImport_GetDynLoadFunc

dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,				    const char *pathname, FILE *fp){	dl_funcptr p;	APIRET  rc;	HMODULE hDLL;	char failreason[256];	char funcname[258];	rc = DosLoadModule(failreason,			   sizeof(failreason),			   pathname,			   &hDLL);	if (rc != NO_ERROR) {		char errBuf[256];		PyOS_snprintf(errBuf, sizeof(errBuf),			      "DLL load failed, rc = %d: %.200s",			      rc, failreason);		PyErr_SetString(PyExc_ImportError, errBuf);		return NULL;	}	PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);	rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);	if (rc != NO_ERROR)		p = NULL; /* Signify Failure to Acquire Entrypoint */	return p;}
开发者ID:1310701102,项目名称:sl4a,代码行数:29,


示例17: QueryPort

ULONG QueryPort(char achBuffer[],ULONG cbBuffSize){//APIRET APIENTRY SplPdQueryPort(HAB hab,PSZ pszPortName,PVOID pBufIn,ULONG cbBuf,PULONG cItems)    PFN pfnProcess;    ULONG ulItemCount = 0;    APIRET rc;    sprintf(szMessage,"Querying %s",szPortName);    PrintString(szMessage,3);    if (hMod != 0)    {        if (DosQueryProcAddr(hMod,0,"SPLPDQUERYPORT",&pfnProcess) == NO_ERROR)            rc = pfnProcess(habAnchorBlock,szPortName,achBuffer,cbBuffSize,&ulItemCount);        else        {            ErrorNotify("Error Getting QUERYPORT Address");            return(FALSE);        }    }    else    {        sprintf(szMessage,"Error Loading Module %s",szModuleName);        ErrorNotify(szMessage);        return(FALSE);    }    if (rc != NO_ERROR)    {        sprintf(szMessage,"Error Querying Port - rc = %X",rc);        ErrorNotify(szMessage);        return(0);    }    sprintf(szMessage,"%s -> %s",szPortName,achBuffer);    PrintString(szMessage,4);    return(ulItemCount);}
开发者ID:OS2World,项目名称:APP-COMM-ComScope,代码行数:35,


示例18: SupportsNumberOfPagesQuery

/* Depending on GBM.DLL version the number of pages can be retrieved (versions > 1.35) * or the functionality does not yet exist. * * Dynamically link the specific function to support also older versions of GBM.DLL. */gbm_boolean SupportsNumberOfPagesQuery(void){#if defined(__OS2__) || defined(OS2)   HMODULE hmod;   PFN     functionAddr = NULL;   APIRET  rc = 0;   /* check version first */   if (gbm_version() < 135)   {      return GBM_FALSE;   }   /* now dynamically link GBM.DLL */   rc = DosLoadModule("", 0, "GBM", &hmod);   if (rc)   {      return GBM_FALSE;   }   /* lookup gbm_read_imgcount() */   rc = DosQueryProcAddr(hmod, 0L, "gbm_read_imgcount", &functionAddr);   DosFreeModule(hmod);   return rc ? GBM_FALSE : GBM_TRUE;#else   /* On all other platforms we assume so far that the correct lib is there. */   return GBM_TRUE;#endif}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:37,


示例19: RemovePort

BOOL RemovePort(void){    PFN pfnProcess;    APIRET rc;    sprintf(szMessage,"Removing %s",szPortName);    PrintString(szMessage,3);    if (hMod != 0)    {        if (DosQueryProcAddr(hMod,0,"SPLPDREMOVEPORT",&pfnProcess) == NO_ERROR)            rc = pfnProcess(habAnchorBlock,szPortName);        else        {            ErrorNotify("Error Getting REMOVEPORT Address");            return(FALSE);        }    }    else    {        sprintf(szMessage,"Error Loading Module %s",szModuleName);        ErrorNotify(szMessage);        return(FALSE);    }    if (rc != NO_ERROR)    {        sprintf(szMessage,"Error Removing Port - rc = %X",rc);        ErrorNotify(szMessage);        return(FALSE);    }    sprintf(szMessage,"Port %s Removed",szPortName);    PrintString(szMessage,4);    return(TRUE);}
开发者ID:OS2World,项目名称:APP-COMM-ComScope,代码行数:33,


示例20: hb_libSymAddr

void * hb_libSymAddr( PHB_ITEM pDynLib, const char * pszSymbol ){   void * hDynLib = hb_libHandle( pDynLib );   if( hDynLib )   {#if defined( HB_OS_WIN_CE )      LPTSTR lpSymbol = hb_mbtowc( pszSymbol );      void * hFuncAddr = ( void * ) GetProcAddress( ( HMODULE ) hDynLib, lpSymbol );      hb_xfree( lpSymbol );      return hFuncAddr;#elif defined( HB_OS_WIN )      return ( void * ) GetProcAddress( ( HMODULE ) hDynLib, pszSymbol );#elif defined( HB_OS_OS2 )      PFN pProcAddr = NULL;      if( DosQueryProcAddr( ( HMODULE ) hDynLib, 0, ( PCSZ ) pszSymbol, &pProcAddr ) == NO_ERROR )         return ( void * ) pProcAddr;#elif defined( HB_HAS_DLFCN )      return dlsym( hDynLib, pszSymbol );#elif defined( HB_CAUSEWAY_DLL )      return GetProcAddress( hDynLib, pszSymbol );#else      HB_SYMBOL_UNUSED( pszSymbol );#endif   }   return NULL;}
开发者ID:emazv72,项目名称:core,代码行数:27,


示例21: MADSysLoad

mad_status MADSysLoad( const char *path, mad_client_routines *cli,                       mad_imp_routines **imp, mad_sys_handle *sys_hdl ){    HMODULE             dll;    mad_init_func       *init_func;    mad_status          status;    char                madname[CCHMAXPATH] = "";    char                madpath[CCHMAXPATH] = "";    /* To prevent conflicts with the 16-bit MAD DLLs, the 32-bit versions have the "D32"     * extension. We will search for them along the PATH (not in LIBPATH);     */    strcpy( madname, path );    strcat( madname, ".D32" );    _searchenv( madname, "PATH", madpath );    if( madpath[0] == '/0' || DosLoadModule( NULL, 0, madpath, &dll ) != 0 ) {        return( MS_ERR|MS_FOPEN_FAILED );    }    status = MS_ERR|MS_INVALID_MAD;    if( DosQueryProcAddr( dll, 0, "MADLOAD", (PFN FAR *)&init_func ) == 0      && (*imp = init_func( &status, cli )) != NULL ) {        *sys_hdl = dll;        return( MS_OK );    }    DosFreeModule( dll );    return( status );}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:27,


示例22: wxCHECK_MSG

void *wxDynamicLibrary::DoGetSymbol(const wxString &name, bool *success) const{    wxCHECK_MSG( IsLoaded(), NULL,                 _T("Can't load symbol from unloaded library") );    void    *symbol = 0;    wxUnusedVar(symbol);#if defined(__WXMAC__) && !defined(__DARWIN__)    Ptr                 symAddress;    CFragSymbolClass    symClass;    Str255              symName;#if TARGET_CARBON    c2pstrcpy( (StringPtr) symName, name.fn_str() );#else    strcpy( (char *)symName, name.fn_str() );    c2pstr( (char *)symName );#endif    if( FindSymbol( m_handle, symName, &symAddress, &symClass ) == noErr )        symbol = (void *)symAddress;#elif defined(__WXPM__) || defined(__EMX__)    DosQueryProcAddr( m_handle, 1L, (PSZ)name.c_str(), (PFN*)symbol );#else    symbol = RawGetSymbol(m_handle, name);#endif    if ( success )        *success = symbol != NULL;    return symbol;}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:31,


示例23: _PR_MD_EARLY_INIT

void_PR_MD_EARLY_INIT(){    HMODULE hmod;    if (DosLoadModule(NULL, 0, "DOSCALL1", &hmod) == 0)        DosQueryProcAddr(hmod, 877, "DOSQUERYTHREADCONTEXT",                         (PFN *)&QueryThreadContext);}
开发者ID:ppbao,项目名称:mozilla-os2,代码行数:9,


示例24: xmlModulePlatformSymbol

static intxmlModulePlatformSymbol(void *handle, const char *name, void **symbol){    int rc;    rc = DosQueryProcAddr(handle, 0, name, symbol);    return (rc == NO_ERROR) ? 0 : -1;}
开发者ID:qtekfun,项目名称:htcDesire820Kernel,代码行数:9,


示例25: mHMod

nsIdleServiceOS2::nsIdleServiceOS2()  : mHMod(NULLHANDLE), mInitialized(PR_FALSE){  const char error[256] = "";  if (DosLoadModule(error, 256, "SSCORE", &mHMod) == NO_ERROR) {    if (DosQueryProcAddr(mHMod, 0, "SSCore_GetInactivityTime",                         (PFN*)&DSSaver_GetInactivityTime) == NO_ERROR) {      mInitialized = PR_TRUE;    }  }}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:11,


示例26: init_pm

int init_pm(void){    PPIB pib;    PTIB tib;    APIRET rc;    HMODULE hMte = 0;    char loadErr[256];    if(hab || hmq)        return 0;    rc = DosGetInfoBlocks(&tib, &pib);    rc = DosQueryModuleHandle("PMWIN", &hMte);    if(rc)        return 1;    pib->pib_ultype = 3;    rc = DosLoadModule(loadErr, sizeof(loadErr), "PMWIN", &hMte);    if(rc)        return 1;    rc = DosQueryProcAddr(hMte, 707, 0, (PFN*)&_inCloseClipbrd);    rc = DosQueryProcAddr(hMte, 716, 0, (PFN*)&_inCreateMsgQueue);    rc = DosQueryProcAddr(hMte, 726, 0, (PFN*)&_inDestroyMsgQueue);    rc = DosQueryProcAddr(hMte, 733, 0, (PFN*)&_inEmptyClipbrd);    rc = DosQueryProcAddr(hMte, 763, 0, (PFN*)&_inInitialize);    rc = DosQueryProcAddr(hMte, 793, 0, (PFN*)&_inOpenClipbrd);    rc = DosQueryProcAddr(hMte, 806, 0, (PFN*)&_inQueryClipbrdData);    rc = DosQueryProcAddr(hMte, 807, 0, (PFN*)&_inQueryClipbrdFmtInfo);    rc = DosQueryProcAddr(hMte, 854, 0, (PFN*)&_inSetClipbrdData);    rc = DosQueryProcAddr(hMte, 888, 0, (PFN*)&_inTerminate);    hab = _inInitialize(0);    hmq = _inCreateMsgQueue(hab, 0);    return 0;}
开发者ID:OS2World,项目名称:UTIL-CLIPBOARD-Clip,代码行数:41,


示例27: main

VOID main( ULONG argc, CHAR *argv[] ){   ULONG    rc        = 0;   ULONG    Address   = 0;   ULONG   *ROBase    = 0;   ULONG   *ROContent = 0;   CHAR     pszError[256];   HMODULE  hModule;   INT      i = 1;   printf("Loading Test of R/O Data to Code Dll/n");   rc = DosLoadModule( pszError,                       sizeof( pszError ),                       "object",                       &hModule );   if( rc )   {      printf("Error trying to load module [%d] on module [%s]/n",rc, pszError );   }   else   {      printf("Loaded Successfully/n");      rc = DosQueryProcAddr( hModule,                             0,                             "DataOffset",                             &Address );      if(!rc)      {         ROBase    = (ULONG *)Address;         ROContent = (ULONG *)*ROBase;         printf("Address to RO Data Query Addr  [0x%8.8x]/n" /                "                   Load  Addr  [0x%8.8x]/n" /                "                   Ptr Content [0x%8.8x]/n", Address,                                                             *ROBase,                                                             *ROContent );      }   }   while( i )   {      i = 1;   }   return;}
开发者ID:OS2World,项目名称:DEV-SAMPLES-The-IBM-Developer-Connection-Release-2--Volume-2_CD4,代码行数:52,


示例28: VManInit

static BOOL VManInit(SDL_PrivateVideoData *pPVData){  CHAR			achBuf[256];  ULONG			ulRC;  INITPROCOUT		sInitProcOut;  ulRC = DosLoadModule( achBuf, sizeof(achBuf), "VMAN", &hmodVMan );  if ( ulRC != NO_ERROR )  {    debug( "Could not load VMAN.DLL, rc = %u : %s", ulRC, achBuf );    return FALSE;  }  ulRC = DosQueryProcAddr( hmodVMan, 0L, "VMIEntry", (PFN *)&pfnVMIEntry );  if ( ulRC != NO_ERROR )  {    debug( "Could not query address of pfnVMIEntry function of VMAN.DLL, "           "rc = %u", ulRC );    DosFreeModule( hmodVMan );    hmodVMan = NULLHANDLE;    return FALSE;  }  sInitProcOut.ulLength = sizeof(sInitProcOut);  ulRC = pfnVMIEntry( 0, VMI_CMD_INITPROC, NULL, &sInitProcOut );  if ( ulRC != RC_SUCCESS )  {    debug( "Could not initialize VMAN for this process" );    DosFreeModule( hmodVMan );    hmodVMan = NULLHANDLE;    return FALSE;  }  if ( pPVData == NULL )  {    // It only check VMan availability...    pfnVMIEntry( 0, VMI_CMD_TERMPROC, NULL, NULL );    return TRUE;  }  ulVRAMAddress = sInitProcOut.ulVRAMVirt;  // Set routine that run when the current process ends, before PM-related  // internal procedure.  ulRC = DosExitList( EXLST_ADD                     | 0x00009900, // Before Presentation Manager (0xA0 - 0xA8)                     _AtExit );  return TRUE;}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:51,



注:本文中的DosQueryProcAddr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DosRead函数代码示例
C++ DosQueryPathInfo函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。