Click here to Skip to main content
15,868,164 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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

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.

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

on window server 2003

thanks in advanced.
Posted
Updated 7-Mar-11 21:51pm
v4

1 solution

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
 
Share this answer
 
Comments
[no name] 8-Mar-11 4:00am    
thanks for replay but
#define _WIN32_WINNT 0x501 Not working.

I was also taken help of MSDN.
Ryan Zahra 8-Mar-11 4:02am    
What's not working? Do you an error message?
[no name] 8-Mar-11 4:05am    
All errors that mention above.

problem with scrollbar values
Ryan Zahra 8-Mar-11 4:09am    
Did you "#include <commctrl.h>"
[no name] 8-Mar-11 4:10am    
Which #include

i am working with normal mfc aplication.

Is you talking about "window.h"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900