Click here to Skip to main content
15,910,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to fetch values from memory using structure variable name. Pin
Albert Holguin27-Mar-12 4:09
professionalAlbert Holguin27-Mar-12 4:09 
QuestionRe: How to fetch values from memory using structure variable name. Pin
CPallini26-Mar-12 21:58
mveCPallini26-Mar-12 21:58 
AnswerRe: How to fetch values from memory using structure variable name. Pin
shanmugarajaa26-Mar-12 22:33
shanmugarajaa26-Mar-12 22:33 
AnswerRe: How to fetch values from memory using structure variable name. Pin
Erudite_Eric26-Mar-12 22:44
Erudite_Eric26-Mar-12 22:44 
GeneralRe: How to fetch values from memory using structure variable name. Pin
shanmugarajaa26-Mar-12 23:44
shanmugarajaa26-Mar-12 23:44 
GeneralRe: How to fetch values from memory using structure variable name. Pin
Erudite_Eric27-Mar-12 1:38
Erudite_Eric27-Mar-12 1:38 
AnswerRe: How to fetch values from memory using structure variable name. Pin
Randor 27-Mar-12 14:16
professional Randor 27-Mar-12 14:16 
Questionc++ win32, swscanf_s - Verify my use of it. Pin
jkirkerx26-Mar-12 11:40
professionaljkirkerx26-Mar-12 11:40 
I wrote a file using WriteFile, and then I read the file back and used swscanf_s, sort of using swprintf_s backwards thinking that it will just pick up the data and assign it.

So I wrote the file like this
swprintf_s( pzDataBuffer_Project, L"PROJECT: %s; %s; %s; %s; %s; %s;\r\nENDPROJECT\r\n", pzProject.szProject_Name, pzProject.szProject_Type, pzProject.szProject_Path, pzProject.szProject_DomainName, pzProject.szProject_LicenseKey );


To produce this, the file contents, Another line of code create the prefix
CSS
Internet Commerce Engine 5 Project File, Format Version 1.00
Site Administrator 2012

PROJECT: Dinostone; North American Standard Edition 2012; C:\NASE2012_Projects\Dinostone; www.dinostone.com; B1M6-19M2-MEM0-6L6J; 銁녪;
ENDPROJECT


And then read the file, and used swscanf_s to assign the pointers
ASM
iReturnFields = swscanf_s( pzDataBuffer, L"PROJECT: %s; %s; %s; %s; %s; %s;\r\nENDPROJECT\r\n", szProject_Name, szProject_Type, szProject_Path, szProject_DomainName, szProject_LicenseKey );
DWORD dwErrorCode = GetLastError();


The information on msdn was sort of vague,
Question:
Is my format not possible for swscanf_s, to assign the pointers?, or do I just have a syntax error in my format?
QuestionRe: c++ win32, swscanf_s - Verify my use of it. Pin
David Crow26-Mar-12 16:52
David Crow26-Mar-12 16:52 
AnswerI think it will never work Pin
jkirkerx27-Mar-12 6:10
professionaljkirkerx27-Mar-12 6:10 
AnswerRe: c++ win32, swscanf_s - Verify my use of it. Pin
Mohibur Rashid26-Mar-12 19:15
professionalMohibur Rashid26-Mar-12 19:15 
GeneralRe: c++ win32, swscanf_s - Verify my use of it. Pin
David Crow27-Mar-12 2:14
David Crow27-Mar-12 2:14 
Generaldone Pin
jkirkerx27-Mar-12 6:11
professionaljkirkerx27-Mar-12 6:11 
QuestionGet defaultUser directory Pin
MrKBA26-Mar-12 3:40
MrKBA26-Mar-12 3:40 
AnswerRe: Get defaultUser directory Pin
Chris Meech26-Mar-12 3:59
Chris Meech26-Mar-12 3:59 
GeneralRe: Get defaultUser directory Pin
MrKBA26-Mar-12 4:11
MrKBA26-Mar-12 4:11 
GeneralRe: Get defaultUser directory Pin
David Crow26-Mar-12 4:33
David Crow26-Mar-12 4:33 
QuestionRe: Get defaultUser directory Pin
David Crow26-Mar-12 4:10
David Crow26-Mar-12 4:10 
AnswerRe: Get defaultUser directory Pin
MrKBA26-Mar-12 4:14
MrKBA26-Mar-12 4:14 
QuestionRe: Get defaultUser directory Pin
David Crow26-Mar-12 4:32
David Crow26-Mar-12 4:32 
AnswerRe: Get defaultUser directory Pin
MrKBA26-Mar-12 4:47
MrKBA26-Mar-12 4:47 
AnswerRe: Get defaultUser directory Pin
MrKBA26-Mar-12 4:54
MrKBA26-Mar-12 4:54 
QuestionVC++: Can't manipulate forms Pin
f907334124-Mar-12 13:50
f907334124-Mar-12 13:50 
QuestionRe: VC++: Can't manipulate forms Pin
David Crow24-Mar-12 16:00
David Crow24-Mar-12 16:00 
AnswerRe: VC++: Can't manipulate forms Pin
Member 875813424-Mar-12 21:57
Member 875813424-Mar-12 21:57 

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.