Click here to Skip to main content
15,917,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can not find class Pin
David Crow8-Sep-03 3:39
David Crow8-Sep-03 3:39 
AnswerRe: Can not find class Pin
imsniper8-Sep-03 3:50
imsniper8-Sep-03 3:50 
QuestionSQL Connect error???? Pin
xxhimanshu7-Sep-03 20:05
xxhimanshu7-Sep-03 20:05 
AnswerRe: SQL Connect error???? Pin
David Crow8-Sep-03 3:42
David Crow8-Sep-03 3:42 
GeneralRe: SQL Connect error???? Pin
xxhimanshu8-Sep-03 17:58
xxhimanshu8-Sep-03 17:58 
GeneralRe: SQL Connect error???? Pin
David Crow9-Sep-03 2:12
David Crow9-Sep-03 2:12 
GeneralRe: SQL Connect error???? Pin
xxhimanshu10-Sep-03 22:14
xxhimanshu10-Sep-03 22:14 
GeneralProblem with code Pin
Ricky Koh7-Sep-03 19:19
Ricky Koh7-Sep-03 19:19 
I have some codes which I don't know how to continue writing. The code goes like this:

HRSRC hrSrc = FindResource(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_LOCKUP_EXE), "Exe");
HGLOBAL hGlobal = LoadResource(AfxGetResourceHandle(), hrSrc);
LPVOID lpExe = LockResource(hGlobal);

CFile file;
file.Open("C:\Testing.exe", CFile::modeCreate | CFile::modeWrite | CFile::shareDenyNone);
file.Write(lpExe, (UINT)SizeofResource(AfxGetResourceHandle(), hrSrc));
file.Close();

HANDLE hExe = LoadLibrary("C:\Testing.exe");
HRSRC hrSrc2 = FindResource(hExe, MAKEINTRESOURCE(IDR_LOCK_FILE), "LOCKFILE");
HGLOBAL hGlobal2 = LoadResource(hExe, hrSrc2);
LPVOID lpExe2 = LockResource(hGlobal2);

LPBYTE sExe2 = (LPBYTE)lpExe2;
LPTSTR sExe3 = (LPTSTR)sExe2;

CFile file2;
file2.Open("C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe", CFile::typeBinary | CFile::modeRead | CFile::shareDenyNone);

CFile file3;
file3.Open(sExe3, CFile::modeWrite | CFile::shareDenyNone);
file3.Write(???);
file3.Close;

For the ???, what should I put in there so that I can insert the AcroRd32.exe as a binary resource into Testing.exe (I don't want to add in the resource manually)? Or should I rewrite some parts of the code?
GeneralRe: Problem with code Pin
Michael Dunn7-Sep-03 20:01
sitebuilderMichael Dunn7-Sep-03 20:01 
GeneralRe: Problem with code Pin
Ricky Koh7-Sep-03 20:22
Ricky Koh7-Sep-03 20:22 
GeneralRe: Problem with code Pin
David Crow8-Sep-03 3:44
David Crow8-Sep-03 3:44 
GeneralRe: Problem with code Pin
Ricky Koh8-Sep-03 5:05
Ricky Koh8-Sep-03 5:05 
GeneralRe: Problem with code Pin
David Crow8-Sep-03 5:40
David Crow8-Sep-03 5:40 
GeneralRe: Problem with code Pin
Ricky Koh8-Sep-03 16:48
Ricky Koh8-Sep-03 16:48 
GeneralRe: Problem with code Pin
David Crow9-Sep-03 2:18
David Crow9-Sep-03 2:18 
GeneralRe: Problem with code Pin
Ricky Koh9-Sep-03 14:48
Ricky Koh9-Sep-03 14:48 
GeneralRe: Problem with code Pin
David Crow10-Sep-03 2:15
David Crow10-Sep-03 2:15 
GeneralRe: Problem with code Pin
Ricky Koh10-Sep-03 17:05
Ricky Koh10-Sep-03 17:05 
GeneralTransfer files Pin
vision20047-Sep-03 18:26
vision20047-Sep-03 18:26 
GeneralRe: Transfer files Pin
Alexander M.,8-Sep-03 0:27
Alexander M.,8-Sep-03 0:27 
GeneralVC.net(vc7) and Win98 Help Pin
psksvp7-Sep-03 17:41
psksvp7-Sep-03 17:41 
GeneralRe: VC.net(vc7) and Win98 Help Pin
Alexander M.,8-Sep-03 0:31
Alexander M.,8-Sep-03 0:31 
GeneralRe: VC.net(vc7) and Win98 Help Pin
RChin8-Sep-03 3:15
RChin8-Sep-03 3:15 
Generaldodgy serial communication Pin
godbert7-Sep-03 17:22
godbert7-Sep-03 17:22 
GeneralRe: dodgy serial communication Pin
Fredrik Skog7-Sep-03 20:20
Fredrik Skog7-Sep-03 20:20 

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.