Click here to Skip to main content
15,904,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDisabling keyboard buttons Pin
Scozturk3-Jul-03 23:50
professionalScozturk3-Jul-03 23:50 
GeneralRe: Disabling keyboard buttons Pin
Rage4-Jul-03 0:45
professionalRage4-Jul-03 0:45 
GeneralRe: Disabling keyboard buttons Pin
Scozturk4-Jul-03 1:14
professionalScozturk4-Jul-03 1:14 
GeneralRe: Disabling keyboard buttons Pin
Ryan Binns4-Jul-03 1:30
Ryan Binns4-Jul-03 1:30 
GeneralIncluding DLL's in EXE file Pin
BoudewijnEctor3-Jul-03 23:44
BoudewijnEctor3-Jul-03 23:44 
GeneralRe: Including DLL's in EXE file Pin
Ryan Binns4-Jul-03 0:48
Ryan Binns4-Jul-03 0:48 
GeneralRe: Including DLL's in EXE file Pin
Dominik Reichl4-Jul-03 2:30
Dominik Reichl4-Jul-03 2:30 
GeneralRe: Including DLL's in EXE file Pin
Navin4-Jul-03 7:07
Navin4-Jul-03 7:07 
There are a couple ways. First of all, if you can, try to link statically. If any of the DLLs are MFC42.dll (or whatever), or MSVCRT.DLL, you can easily link them statically. In fact this would be your only course of action aside from installing them or assuming they are already on the system (both options are dangerous.)

If you link your DLLs implicitly (e.g., using a .lib file), you are screwed. You'll have no choice but to copy the DLL at install time. The only way around tihs is if the provider of the DLL also gave you source code or a library you can statically link. Then you can do that and not need the DLL at all.

If you have a DLL that you call explicitly (e.g., via LoadLibrary), it is convoluted, but possible, to do what you want. I cannot remember the exact code, but the idea is this:
1. Before compiling, in your resouce file, insert the DLL as a resource (make it a custom type, or "FILE" or something.)
2. In your code, Using resource functions, extract that resouce and save it into a temp directory (e.g., call ::GetTempDirectory and save it there.)
3. In your LoadLibrary call, use the path that you extracted it to (temp dir + DLL name.)

Sorry I can't provide the exact code, but it is on my work computer, and I am not about to go into work on a holiday. Big Grin | :-D


"When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
GeneralSetups for networks Pin
BoudewijnEctor3-Jul-03 23:36
BoudewijnEctor3-Jul-03 23:36 
General"while (==)" Pin
FlyingDancer3-Jul-03 23:33
FlyingDancer3-Jul-03 23:33 
GeneralRe: "while (==)" Pin
Ryan_Roberts3-Jul-03 23:41
Ryan_Roberts3-Jul-03 23:41 
GeneralRe: "while (==)" Pin
Ryan Binns4-Jul-03 0:38
Ryan Binns4-Jul-03 0:38 
GeneralRe: "while (==)" Pin
FlyingDancer4-Jul-03 1:27
FlyingDancer4-Jul-03 1:27 
GeneralRe: "while (==)" Pin
Ryan Binns4-Jul-03 1:34
Ryan Binns4-Jul-03 1:34 
GeneralRe: "while (==)" Pin
FlyingDancer4-Jul-03 2:05
FlyingDancer4-Jul-03 2:05 
GeneralRe: "while (==)" Pin
Ryan Binns4-Jul-03 2:14
Ryan Binns4-Jul-03 2:14 
GeneralRe: "while (==)" Pin
FlyingDancer4-Jul-03 3:06
FlyingDancer4-Jul-03 3:06 
GeneralRe: "while (==)" Pin
Ryan Binns4-Jul-03 3:10
Ryan Binns4-Jul-03 3:10 
GeneralRe: "while (==)" Pin
FlyingDancer4-Jul-03 3:51
FlyingDancer4-Jul-03 3:51 
GeneralRe: "while (==)" Pin
FlyingDancer6-Jul-03 15:58
FlyingDancer6-Jul-03 15:58 
GeneralRe: "while (==)" Pin
Ryan Binns6-Jul-03 17:18
Ryan Binns6-Jul-03 17:18 
GeneralCDateTimeCtrl,CTime Pin
Kamesh3-Jul-03 23:31
Kamesh3-Jul-03 23:31 
GeneralRe: CDateTimeCtrl,CTime Pin
Ryan Binns4-Jul-03 0:45
Ryan Binns4-Jul-03 0:45 
GeneralRe: CDateTimeCtrl,CTime Pin
Rage4-Jul-03 0:53
professionalRage4-Jul-03 0:53 
GeneralRe: CDateTimeCtrl,CTime Pin
Ryan Binns4-Jul-03 0:58
Ryan Binns4-Jul-03 0:58 

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.