Click here to Skip to main content
15,901,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Henry miller15-Jul-04 12:32
Henry miller15-Jul-04 12:32 
GeneralRe: Fastest way to find a file exists on hard drive? Pin
Henry miller16-Jul-04 2:47
Henry miller16-Jul-04 2:47 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Anders Molin15-Jul-04 12:33
professionalAnders Molin15-Jul-04 12:33 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Anonymous15-Jul-04 20:55
Anonymous15-Jul-04 20:55 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Blake Miller20-Jul-04 12:29
Blake Miller20-Jul-04 12:29 
GeneralGetDC drawing in win32 Pin
jass198115-Jul-04 10:31
sussjass198115-Jul-04 10:31 
GeneralRe: GetDC drawing in win32 Pin
RobJones15-Jul-04 11:23
RobJones15-Jul-04 11:23 
GeneralLPTSTR, LPCTSTR, CString and others... Pin
Kaleb Pederson15-Jul-04 9:22
Kaleb Pederson15-Jul-04 9:22 
I'm new to Windows programming (not C/C++) and I'm having a hard time with all of the different string facilities. For example, I wanted to do a simple registry read, so I tried:

LPCTSTR strEntry = _T("SOFTWARE\\Microsoft\\...path...");
LPTSTR val;
ULONG max_size = 1024;
if ((retval = rc->QueryStringValue(strEntry,val,&max_size)) != ERROR_SUCCESS) { /* an error occurred */ ... }

Which dies. Apparently LPTSTR needs to be allocated, but I don't need an array of them (as one might with chars) so that wouldn't help.

I found a bunch of documentation on converting strings of various types, but I'd like to allocate one.

Thanks for the help.
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Toni7815-Jul-04 9:40
Toni7815-Jul-04 9:40 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Adam Durity15-Jul-04 9:49
Adam Durity15-Jul-04 9:49 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Antti Keskinen15-Jul-04 9:53
Antti Keskinen15-Jul-04 9:53 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Kaleb Pederson15-Jul-04 11:25
Kaleb Pederson15-Jul-04 11:25 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Antti Keskinen15-Jul-04 11:50
Antti Keskinen15-Jul-04 11:50 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
PJ Arends15-Jul-04 17:14
professionalPJ Arends15-Jul-04 17:14 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Mike Dimmick15-Jul-04 9:58
Mike Dimmick15-Jul-04 9:58 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
digwizfox15-Jul-04 11:07
digwizfox15-Jul-04 11:07 
Generalabt running exe Pin
jass198115-Jul-04 9:20
sussjass198115-Jul-04 9:20 
GeneralRe: abt running exe Pin
Toni7815-Jul-04 9:42
Toni7815-Jul-04 9:42 
GeneralRe: abt running exe Pin
PJ Arends15-Jul-04 9:47
professionalPJ Arends15-Jul-04 9:47 
GeneralRe: abt running exe Pin
Paul Steane16-Jul-04 1:33
Paul Steane16-Jul-04 1:33 
GeneralIJolietDiscMaster & Joliet & Invalid Naming Convention Pin
epxhi15-Jul-04 9:10
epxhi15-Jul-04 9:10 
GeneralDumb loop question. Pin
RobJones15-Jul-04 9:03
RobJones15-Jul-04 9:03 
GeneralRe: Dumb loop question. Pin
palbano15-Jul-04 9:19
palbano15-Jul-04 9:19 
GeneralRe: Dumb loop question. Pin
RobJones15-Jul-04 9:24
RobJones15-Jul-04 9:24 
GeneralRe: Dumb loop question. Pin
palbano15-Jul-04 9:30
palbano15-Jul-04 9:30 

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.