Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhy dosen't ShellExecute run some of commands? Pin
Joseph Marzbani8-Nov-08 9:26
Joseph Marzbani8-Nov-08 9:26 
AnswerRe: Why dosen't ShellExecute run some of commands? Pin
Mark Salsbery8-Nov-08 13:43
Mark Salsbery8-Nov-08 13:43 
AnswerRe: Why dosen't ShellExecute run some of commands? Pin
Joseph Marzbani8-Nov-08 16:56
Joseph Marzbani8-Nov-08 16:56 
GeneralRe: Why dosen't ShellExecute run some of commands? Pin
toxcct9-Nov-08 2:53
toxcct9-Nov-08 2:53 
GeneralRe: Why dosen't ShellExecute run some of commands? Pin
Mark Salsbery9-Nov-08 6:10
Mark Salsbery9-Nov-08 6:10 
QuestionGet the lparam of a SETTEXT hook message Pin
ignacio rivera8-Nov-08 8:00
ignacio rivera8-Nov-08 8:00 
AnswerRe: Get the lparam of a SETTEXT hook message Pin
AtomAnt10-Nov-08 8:08
AtomAnt10-Nov-08 8:08 
QuestionHow to Display a SDI Application Started with main window hidden Pin
vikrant kpr8-Nov-08 7:09
vikrant kpr8-Nov-08 7:09 
AnswerRe: How to Display a SDI Application Started with main window hidden Pin
Mark Salsbery8-Nov-08 8:07
Mark Salsbery8-Nov-08 8:07 
GeneralRe: How to Display a SDI Application Started with main window hidden Pin
vikrant kpr8-Nov-08 8:18
vikrant kpr8-Nov-08 8:18 
QuestionHow can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
Joseph Marzbani8-Nov-08 6:09
Joseph Marzbani8-Nov-08 6:09 
QuestionRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
CPallini8-Nov-08 6:22
mveCPallini8-Nov-08 6:22 
AnswerRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
Joseph Marzbani8-Nov-08 8:00
Joseph Marzbani8-Nov-08 8:00 
GeneralRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
CPallini8-Nov-08 9:52
mveCPallini8-Nov-08 9:52 
AnswerRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
Mark Salsbery8-Nov-08 8:29
Mark Salsbery8-Nov-08 8:29 
AnswerRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
Saurabh.Garg8-Nov-08 13:27
Saurabh.Garg8-Nov-08 13:27 
AnswerRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
Joseph Marzbani8-Nov-08 17:04
Joseph Marzbani8-Nov-08 17:04 
GeneralRe: How can I compress (zip) a file using pure win32/64 API or plain "C++"? Pin
Saurabh.Garg8-Nov-08 18:47
Saurabh.Garg8-Nov-08 18:47 
QuestionGetVolumeInformation in a Simple DLL Pin
logicon8-Nov-08 4:32
logicon8-Nov-08 4:32 
AnswerRe: GetVolumeInformation in a Simple DLL Pin
CPallini8-Nov-08 5:03
mveCPallini8-Nov-08 5:03 
GeneralRe: GetVolumeInformation in a Simple DLL Pin
logicon8-Nov-08 5:24
logicon8-Nov-08 5:24 
GeneralRe: GetVolumeInformation in a Simple DLL Pin
CPallini8-Nov-08 6:14
mveCPallini8-Nov-08 6:14 
GeneralRe: GetVolumeInformation in a Simple DLL Pin
logicon8-Nov-08 5:35
logicon8-Nov-08 5:35 
What I am trying to compile is :

#include <stdio.h>
#include <windows.h>

extern "C"
{
	__declspec(dllexport) void DisplayHelloFromDLL()
	{
		char buffVN[512];
		char buffSN[512];
		char buffMCL[512];
		char buffFSN[512];
		char *v = "C:\\";

		GetVolumeInformation(v, buffVN, 512, buffSN, buffMCL, 0x00000002, buffFSN, 512);

		printf ("Serial Number [%s]\n", buffSN);
		printf ("Hello from DLL !\n");
	}

}
</windows.h></stdio.h>


I am getting error:

error C2664: 'GetVolumeInformationW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR'
GeneralRe: GetVolumeInformation in a Simple DLL Pin
Mark Salsbery8-Nov-08 5:56
Mark Salsbery8-Nov-08 5:56 
GeneralRe: GetVolumeInformation in a Simple DLL Pin
logicon8-Nov-08 6:48
logicon8-Nov-08 6:48 

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.