Click here to Skip to main content
15,885,767 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: DMA access from user-mode Pin
Eytukan23-Mar-09 18:33
Eytukan23-Mar-09 18:33 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 19:33
Maxwell Chen23-Mar-09 19:33 
Questionproblem facing in updating images dynamically at runtime using IWebBrwoser2 and IHTMLElement in custom browser Pin
Abhijit A22-Mar-09 21:39
Abhijit A22-Mar-09 21:39 
QuestionSHFILEOPSTRUCT in unicode [modified] Pin
p_196022-Mar-09 20:40
p_196022-Mar-09 20:40 
AnswerRe: SHFILEOPSTRUCT in unicode Pin
Jijo.Raj22-Mar-09 20:53
Jijo.Raj22-Mar-09 20:53 
GeneralRe: SHFILEOPSTRUCT in unicode Pin
p_196022-Mar-09 22:07
p_196022-Mar-09 22:07 
GeneralRe: SHFILEOPSTRUCT in unicode Pin
CPallini22-Mar-09 22:14
mveCPallini22-Mar-09 22:14 
AnswerRe: SHFILEOPSTRUCT in unicode [modified] Pin
Iain Clarke, Warrior Programmer22-Mar-09 23:45
Iain Clarke, Warrior Programmer22-Mar-09 23:45 
I think I may have found your issue...

MSDN wrote:
pFrom
Address of a buffer to specify one or more source file names. These names must be fully qualified paths. Standard DOS wild cards, such as "*", are permitted in the file-name position. Although this member is declared as a null-terminated string, it is used as a buffer to hold multiple file names. Each file name must be terminated by a single NULL character. An additional NULL character must be appended to the end of the final name to indicate the end of pFrom.


You don't give an additional NULL, so the shell operation carries on looking for the next string... which will be gobbledegook at best. I think the compiler is adding padding, which is why the next character stands a better chance of being NULL in the ansi version then the unicode version. This theory is very handwavy and untested, but you are not following the manual either way.

So, try:
sh.pFrom = T("C:\\Documents and Settings\\Myid\\Local Settings\\Temp\\Tester\0"); // Give it an extra NULL.


Less importantly, I'd write
sh.hNameMappings = NULL;

MSDN wrote:
...Treat hNameMappings as a pointer to a structure...


It's the same thing really, but it will help you in a years time and you come back to read the code...

Hope that helped,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

modified on Monday, March 23, 2009 5:57 AM

GeneralRe: SHFILEOPSTRUCT in unicode Pin
p_196023-Mar-09 0:05
p_196023-Mar-09 0:05 
GeneralRe: SHFILEOPSTRUCT in unicode Pin
Iain Clarke, Warrior Programmer23-Mar-09 0:13
Iain Clarke, Warrior Programmer23-Mar-09 0:13 
QuestionMultiThreading Pin
NewVC++22-Mar-09 19:45
NewVC++22-Mar-09 19:45 
AnswerRe: MultiThreading Pin
_AnsHUMAN_ 22-Mar-09 20:00
_AnsHUMAN_ 22-Mar-09 20:00 
GeneralRe: MultiThreading Pin
NewVC++22-Mar-09 20:17
NewVC++22-Mar-09 20:17 
GeneralRe: MultiThreading Pin
_AnsHUMAN_ 22-Mar-09 20:22
_AnsHUMAN_ 22-Mar-09 20:22 
AnswerRe: MultiThreading Pin
David Crow23-Mar-09 3:34
David Crow23-Mar-09 3:34 
QuestionDrag & drop between tree controls(Very Urgent........) Pin
AnithaSubramani22-Mar-09 19:22
AnithaSubramani22-Mar-09 19:22 
AnswerRe: Drag & drop between tree controls(Very Urgent........) Pin
Jijo.Raj22-Mar-09 19:45
Jijo.Raj22-Mar-09 19:45 
AnswerRe: Drag & drop between tree controls(Very Urgent........) Pin
Iain Clarke, Warrior Programmer23-Mar-09 0:07
Iain Clarke, Warrior Programmer23-Mar-09 0:07 
QuestionRe: Drag & drop between tree controls(Very Urgent........) Pin
David Crow23-Mar-09 3:37
David Crow23-Mar-09 3:37 
QuestionOle problem when using with Microsoft Power Point Pin
Member 411184722-Mar-09 18:40
Member 411184722-Mar-09 18:40 
QuestionBuild Errors Using CString not CStringT Pin
ForNow22-Mar-09 10:53
ForNow22-Mar-09 10:53 
AnswerRe: Build Errors Using CString not CStringT Pin
Joe Woodbury22-Mar-09 14:35
professionalJoe Woodbury22-Mar-09 14:35 
GeneralRe: Build Errors Using CString not CStringT Pin
ForNow22-Mar-09 14:51
ForNow22-Mar-09 14:51 
GeneralRe: Build Errors Using CString not CStringT Pin
Joe Woodbury22-Mar-09 14:59
professionalJoe Woodbury22-Mar-09 14:59 
GeneralRe: Build Errors Using CString not CStringT Pin
ForNow22-Mar-09 15:12
ForNow22-Mar-09 15:12 

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.