Click here to Skip to main content
16,013,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to dynamically load GdiPlus.dll? Pin
Maxwell Chen16-Jun-06 7:11
Maxwell Chen16-Jun-06 7:11 
QuestionRe: How to dynamically load GdiPlus.dll? Pin
Cyrus Dang16-Jun-06 7:27
Cyrus Dang16-Jun-06 7:27 
AnswerRe: How to dynamically load GdiPlus.dll? Pin
Maxwell Chen16-Jun-06 8:01
Maxwell Chen16-Jun-06 8:01 
AnswerRe: How to dynamically load GdiPlus.dll? Pin
Jun Du16-Jun-06 7:48
Jun Du16-Jun-06 7:48 
GeneralRe: How to dynamically load GdiPlus.dll? Pin
bob1697216-Jun-06 9:11
bob1697216-Jun-06 9:11 
GeneralRe: How to dynamically load GdiPlus.dll? Pin
Jun Du16-Jun-06 12:09
Jun Du16-Jun-06 12:09 
GeneralRe: How to dynamically load GdiPlus.dll? Pin
Cyrus Dang16-Jun-06 13:35
Cyrus Dang16-Jun-06 13:35 
GeneralRe: How to dynamically load GdiPlus.dll? Pin
Jun Du16-Jun-06 15:51
Jun Du16-Jun-06 15:51 
I think I know your situation better now. The issue should be resolveable.

Tuan Dang wrote:
Jun Du wrote:
With or without GDI+, your app should start peacefully.


Is it true?


Yes. It's your respossibility to handle this more properly.

Tuan Dang wrote:

When starting in Windows 2000 (in which gdiplus.dll is unavailable), my program caused an error saying that "The dynamic link library gdiplus.dll could not be found in the specified path...". Then it terminated.
With that error, I don't think we can say the program starts peacefully.


If the app was linked to gdiplus.lib, it will look for the corresponding DLL at the start-up. That's how it works. You've already realized that, as you stated in the following:

Tuan Dang wrote:
I realize that whether the GDI+ functions are actually called or not, file gdiplus.dll is always required.


But even you dynamically load the DLL, your app has no clue whether the DLL is present or not.

Tuan Dang wrote:
My question is that do we have any ways to smartly use GDI+ functions only when its DLL is avaialabe. Otherwise, all program's functionalities related to GDI+ should be quietly and programmatically disabled.


Yes. I can think of two options:

1) Include gdiplus.dll in your final deliverables. I've noticed many venders do this and a couple of CP articles do so as well.
2) Add code to check if gdiplus.dll exists in the target computer. I remember it's part of Platform SDK for Winows 2000 (SDK 2003?). To guarantee that you can load, you also may include in the documentation that the target machine must have a recent Platform SDK installed.

Hope this helps.


- It's easier to make than to correct a mistake.
GeneralRe: How to dynamically load GdiPlus.dll? Pin
bob1697216-Jun-06 17:35
bob1697216-Jun-06 17:35 
GeneralRe: How to dynamically load GdiPlus.dll? Pin
James Brown18-Jun-06 22:20
James Brown18-Jun-06 22:20 
Questionenter key Pin
Tara1416-Jun-06 6:51
Tara1416-Jun-06 6:51 
AnswerRe: enter key Pin
Jun Du16-Jun-06 7:56
Jun Du16-Jun-06 7:56 
GeneralRe: enter key Pin
Tara1416-Jun-06 8:58
Tara1416-Jun-06 8:58 
GeneralRe: enter key Pin
Tara1416-Jun-06 9:27
Tara1416-Jun-06 9:27 
QuestionExcluding random choices (std c++) Pin
Peter Charlesworth16-Jun-06 5:01
Peter Charlesworth16-Jun-06 5:01 
AnswerRe: Excluding random choices (std c++) Pin
capricious_00116-Jun-06 5:14
capricious_00116-Jun-06 5:14 
AnswerRe: Excluding random choices (std c++) [modified] Pin
Stephen Hewitt16-Jun-06 5:28
Stephen Hewitt16-Jun-06 5:28 
GeneralRe: Excluding random choices (std c++) Pin
Garth J Lancaster16-Jun-06 16:33
professionalGarth J Lancaster16-Jun-06 16:33 
AnswerRe: Excluding random choices (std c++) Pin
Chris Losinger16-Jun-06 6:35
professionalChris Losinger16-Jun-06 6:35 
Question'HDEVINFO' and 'SP_DEVICE_INTERFACE_DATA' Pin
kitty516-Jun-06 4:49
kitty516-Jun-06 4:49 
AnswerRe: 'HDEVINFO' and 'SP_DEVICE_INTERFACE_DATA' Pin
Viorel.16-Jun-06 4:54
Viorel.16-Jun-06 4:54 
GeneralRe: 'HDEVINFO' and 'SP_DEVICE_INTERFACE_DATA' Pin
kitty516-Jun-06 5:02
kitty516-Jun-06 5:02 
GeneralRe: 'HDEVINFO' and 'SP_DEVICE_INTERFACE_DATA' Pin
Viorel.16-Jun-06 5:13
Viorel.16-Jun-06 5:13 
QuestionRe: 'HDEVINFO' and 'SP_DEVICE_INTERFACE_DATA' Pin
kitty516-Jun-06 5:18
kitty516-Jun-06 5:18 
AnswerRe: 'HDEVINFO' and 'SP_DEVICE_INTERFACE_DATA' Pin
Viorel.16-Jun-06 5:26
Viorel.16-Jun-06 5:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.