Click here to Skip to main content
15,914,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: What is the SEH in release build VS2008 with fclose()? Pin
Chesnokov Yuriy23-Mar-09 2:10
professionalChesnokov Yuriy23-Mar-09 2:10 
AnswerRe: What is the SEH in release build VS2008 with fclose()? Pin
Eytukan23-Mar-09 2:47
Eytukan23-Mar-09 2:47 
QuestionDMA access from user-mode Pin
Maxwell Chen22-Mar-09 21:58
Maxwell Chen22-Mar-09 21:58 
AnswerRe: DMA access from user-mode Pin
Iain Clarke, Warrior Programmer22-Mar-09 23:35
Iain Clarke, Warrior Programmer22-Mar-09 23:35 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 3:58
Maxwell Chen23-Mar-09 3:58 
AnswerRe: DMA access from user-mode Pin
Eytukan23-Mar-09 0:41
Eytukan23-Mar-09 0:41 
GeneralRe: DMA access from user-mode Pin
CPallini23-Mar-09 1:32
mveCPallini23-Mar-09 1:32 
GeneralRe: DMA access from user-mode Pin
Eytukan23-Mar-09 2:48
Eytukan23-Mar-09 2:48 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 4:13
Maxwell Chen23-Mar-09 4:13 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 4:09
Maxwell Chen23-Mar-09 4:09 
GeneralRe: DMA access from user-mode Pin
Eytukan23-Mar-09 4:52
Eytukan23-Mar-09 4:52 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 4:56
Maxwell Chen23-Mar-09 4:56 
GeneralRe: DMA access from user-mode Pin
Eytukan23-Mar-09 17:56
Eytukan23-Mar-09 17:56 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 18:30
Maxwell Chen23-Mar-09 18:30 
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 

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.