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

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

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

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

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

示例1: sizeof

//-----  InitInstance()  ------------------------------------------------------BOOL CNifUtilsSuiteApp::InitInstance(){	//  init common controls (since Win95)	INITCOMMONCONTROLSEX	InitCtrls;	InitCtrls.dwSize = sizeof(InitCtrls);	InitCtrls.dwICC  = ICC_WIN95_CLASSES;	InitCommonControlsEx(&InitCtrls);	//  init own instance	CWinAppEx::InitInstance();	//  no interaction with Win7 taskbar	EnableTaskbarInteraction(FALSE);	//  init RichEdit	AfxInitRichEdit2();	//  initialize configuration	CStringA	configName;	bool		hasConfig(false);	GetModuleFileNameA(NULL, configName.GetBuffer(MAX_PATH), MAX_PATH);	configName.ReleaseBuffer();	configName.Replace(".exe", ".xml");	hasConfig = Configuration::initInstance((const char*) configName);	//  initialize Havok  (HK_MEMORY_USAGE bytes of physics solver buffer)	hkMemoryRouter*		pMemoryRouter(hkMemoryInitUtil::initDefault(hkMallocAllocator::m_defaultMallocAllocator, hkMemorySystem::FrameInfo(HK_MEMORY_USAGE)));	hkBaseSystem::init(pMemoryRouter, errorReport);	//  initialize material map	Configuration*	pConfig(Configuration::getInstance());	NifUtlMaterialList::initInstance(pConfig->_pathNifXML, pConfig->_matScanTag, pConfig->_matScanName);	// Register the application's document templates.	CSingleDocTemplate*	pDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME,															RUNTIME_CLASS(CNifUtilsSuiteDoc),															RUNTIME_CLASS(CNifUtilsSuiteFrame),															RUNTIME_CLASS(CFormNifConvertView))															);	if (!pDocTemplate)		return FALSE;	AddDocTemplate(pDocTemplate);	// Parse command line for standard shell commands, DDE, file open	CCommandLineInfo	cmdInfo;	ParseCommandLine(cmdInfo);	if (!ProcessShellCommand(cmdInfo))		return FALSE;	// call DragAcceptFiles only if there's a suffix	//  In an SDI app, this should occur after ProcessShellCommand	// The one and only window has been initialized, so show and update it	m_pMainWnd->ShowWindow(SW_SHOW);	m_pMainWnd->UpdateWindow();	if (!hasConfig)	{		AfxMessageBox(L"Seems you're running NifUtilsSuite for the first time./nYou're redirected to Settings now.");		m_pMainWnd->PostMessage(WM_COMMAND, ID_OPTIONS_EDIT);	}	return TRUE;}
开发者ID:skyfox69,项目名称:NifUtilsSuite,代码行数:68,


示例2: MyGetProcAddress

static FARPROC WINAPIMyGetProcAddress(HMODULE hModule, LPCSTR lpProcName) {    if (VERBOSITY >= 3) {        /* XXX this can cause segmentation faults */        logGetProcAddress(hModule, lpProcName);    }    if (!NOOP) {        char szModule[MAX_PATH];        DWORD dwRet = GetModuleFileNameA(hModule, szModule, sizeof szModule);        assert(dwRet);        const char *szBaseName = getBaseName(szModule);        ModulesMap::const_iterator modIt;        modIt = modulesMap.find(szBaseName);        if (modIt != modulesMap.end()) {            if (VERBOSITY > 1 && VERBOSITY < 3) {                logGetProcAddress(hModule, lpProcName);            }            const Module & module = modIt->second;            const FunctionMap & functionMap = module.functionMap;            FunctionMap::const_iterator fnIt;            if (HIWORD(lpProcName) == 0) {                FARPROC proc = GetProcAddress(hModule, lpProcName);                if (!proc) {                    return proc;                }                for (fnIt = functionMap.begin(); fnIt != functionMap.end(); ++fnIt) {                    FARPROC pRealProc = GetProcAddress(hModule, fnIt->first);                    if (proc == pRealProc) {                        if (VERBOSITY > 0) {                            debugPrintf("inject: replacing %s!%s/n", szBaseName, lpProcName);                        }                        return (FARPROC)fnIt->second;                    }                }                                debugPrintf("inject: ignoring %[email
C++ GetModuleFileNameEx函数代码示例
C++ GetModuleBaseName函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。