在mfc应用程序中使用setDlldirectory() [英] used of setDlldirectory() in mfc application

查看:248
本文介绍了在mfc应用程序中使用setDlldirectory()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在动态加载它时寻求dll问题

我得到了从用户定义文件夹加载dll的问题的解决方案.
解决方案
现在我想动态设置dll目录,所以我想使用setdlldirectory()函数
要使用此功能,我们必须设置

Hi All

I''m seek with dll problem of while loading it dynamically

i got solution to my question of loading dll from user define folder.
Solution
now i want to set dll directory dynamically to do so i want to used setdlldirectory() function
to used this function we must set

#define _win32_winnt 0x502


在stdafx.h

将此设置为0x502而不是0x400(默认值)

给出了SCrollbar和Toolbar的错误.
出现以下错误


in stdafx.h

setting this to 0x502 instead of 0x400(by default value)

gives error of SCrollbar and Toolbar.
following errors

<br />
PSCROLLBARINFO undeclared identifier in afxwin.h<br />
CCM_SETWINDOWTHEME is undeclared identifier in afxcmm3.inl<br />
GetScrollBarInfo() is not define in afxwin4.inl


ETC.

可以使用SetDlldirectory()以及getDllDirectory()函数正常使用Visual stuadio 2003的mfc应用程序

在Window Server 2003上


ETC.

can normal mfc application of visual stuadio 2003 used SetDlldirectory() as well as getDllDirectory() function

on window server 2003

thanks in advanced.

推荐答案

是的,用Visual Studio 2003编写的MFC应用程序可以使用这些功能.有关定义的更好概述,请阅读以下文章: http://msdn.microsoft.com/zh-CN/library/aa383745.aspx

要解决您的问题,必须在stdafx.h的顶部写以下内容
Yes MFC applications written in Visual Studio 2003 can use those functions. For a better overview of the definition, please read the following article: http://msdn.microsoft.com/en-us/library/aa383745.aspx

To overcome your problem, you must write the following at the top of stdafx.h
#ifndef _WIN32_WINNT        // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif    

#pragma once


这篇关于在mfc应用程序中使用setDlldirectory()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆