Click here to Skip to main content
15,895,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWeird situation with WinSock Pin
hxhl957-Nov-09 19:19
hxhl957-Nov-09 19:19 
AnswerRe: Weird situation with WinSock Pin
Code-o-mat8-Nov-09 0:01
Code-o-mat8-Nov-09 0:01 
GeneralRe: Weird situation with WinSock Pin
hxhl958-Nov-09 6:41
hxhl958-Nov-09 6:41 
AnswerRe: Weird situation with WinSock Pin
David Crow9-Nov-09 3:20
David Crow9-Nov-09 3:20 
Questionwin32 prog Pin
himmi20097-Nov-09 16:40
himmi20097-Nov-09 16:40 
GeneralRe: win32 prog Pin
himmi20097-Nov-09 16:41
himmi20097-Nov-09 16:41 
AnswerRe: win32 prog Pin
«_Superman_»7-Nov-09 18:38
professional«_Superman_»7-Nov-09 18:38 
AnswerRe: win32 prog Pin
himmi20098-Nov-09 4:17
himmi20098-Nov-09 4:17 
did you mean the fllowing code i tried? having errors
really not getting through !! kindly help me

what i want to have is
------------------------

a Win32 Program with the name “Add” that takes a string as input at command line. The command line argument should be of the following format (commandline argument may be provided from DOS console):

D:\Add\Debug>Add 2,4

The program will extract the integer values from commandline string (e.g. it will extract the values “2” and “4” in above argument) and will add them, finally the result will be displayed in a message box:

-----------------------






what i did

// Add.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
LPWSTR *szArgList;
int argCount;

szArgList = CommandLineToArgvW(GetCommandLine(), Add 2  4 );
if (szArgList == NULL)
{
MessageBox(NULL, L"Unable to parse command line", L"Error", MB_OK);
return 10;
}

for (int i = 0; i < argCount; ++i)

{
MessageBox(NULL, szArgList[i], L"Answer is", MB_OK);
}

LocalFree(szArgList);
return 0;
}

GeneralRe: win32 prog Pin
«_Superman_»8-Nov-09 6:13
professional«_Superman_»8-Nov-09 6:13 
QuestionRe: win32 prog Pin
David Crow9-Nov-09 3:23
David Crow9-Nov-09 3:23 
QuestionSerialization from a CPropertypage class behaves differently [modified] Pin
al25007-Nov-09 14:18
al25007-Nov-09 14:18 
AnswerRe: Serialization from a CPropertypage class behaves differently Pin
«_Superman_»7-Nov-09 18:41
professional«_Superman_»7-Nov-09 18:41 
GeneralRe: Serialization from a CPropertypage class behaves differently [modified] Pin
al25008-Nov-09 8:04
al25008-Nov-09 8:04 
QuestionBeginner question using headers Pin
Jacob Dixon7-Nov-09 10:49
Jacob Dixon7-Nov-09 10:49 
AnswerRe: Beginner question using headers Pin
Jacob Dixon7-Nov-09 10:53
Jacob Dixon7-Nov-09 10:53 
GeneralRe: Beginner question using headers Pin
«_Superman_»7-Nov-09 10:57
professional«_Superman_»7-Nov-09 10:57 
AnswerRe: Beginner question using headers Pin
«_Superman_»7-Nov-09 10:56
professional«_Superman_»7-Nov-09 10:56 
GeneralRe: Beginner question using headers Pin
Jacob Dixon7-Nov-09 11:30
Jacob Dixon7-Nov-09 11:30 
GeneralRe: Beginner question using headers Pin
Chris Losinger7-Nov-09 14:37
professionalChris Losinger7-Nov-09 14:37 
GeneralRe: Beginner question using headers Pin
Jacob Dixon7-Nov-09 14:41
Jacob Dixon7-Nov-09 14:41 
GeneralRe: Beginner question using headers Pin
Tim Craig7-Nov-09 21:07
Tim Craig7-Nov-09 21:07 
GeneralRe: Beginner question using headers [modified] Pin
LunaticFringe8-Nov-09 8:49
LunaticFringe8-Nov-09 8:49 
GeneralRe: Beginner question using headers Pin
Chris Losinger8-Nov-09 10:13
professionalChris Losinger8-Nov-09 10:13 
GeneralRe: Beginner question using headers Pin
LunaticFringe8-Nov-09 10:26
LunaticFringe8-Nov-09 10:26 
QuestionGet IExplorerBrowser from a Windows Explorer (Vista) Pin
Ivo Beltchev7-Nov-09 7:35
Ivo Beltchev7-Nov-09 7:35 

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.