|
Use the quotes to delimit a single argument. Without quotes, spaces delimit arguments. If a single argument has an embedded space, put the whole argument in double quotes.
You needed the quotes for the Word document because the file name had embedded spaces.
For the game, there are actually 5 arguments:
- -quickstart
- -xres
- 1280
- -yres
- 1040
You wrapped all five in one pair of quotes, so this was interpreted by the program as a single argument.
Hope that helps.
Brad
|
|
|
|
|
Hello, everyone!
I think in C/C++ programming, you need to define a variable as
extern but there is no need to define a function as extern. The only
useful qualifier keyword used before a function is "static". And I
think you can use "#include .h" when you want to use other functions
defined in other files.
Am I correct?
regards,
George
|
|
|
|
|
For free functions (C-ctyle functions), static means the function is not visible outside of the compilation unit (normally the .c or .cpp file).
The default is extern which means the function is visible - when an appropriate declaration is provided - outside of the compilation unit.
Brad
|
|
|
|
|
Thanks, Brad buddy!
Can you show me a case when "extern" keyword is a must? I think if we use
"#include .h" method, no extern functions are needed to use.
regards,
George
|
|
|
|
|
extern is never required since it's the default i.e. if you want the function visible outside of the compilation unit specify extern or specify nothing. Both have the same meaning.
Brad
|
|
|
|
|
Thanks, Brad buddy!
George
|
|
|
|
|
In addition to Brad's answer, I would like to show you some interesting example as demonstrated later in this message.
Anyway, I still recommend you getting a good C++ language book.
The example as:
[file main.cpp]
extern void Test();
extern void Test();
int iGlobalNumber;
void main()
{
iGlobalNumber = 2;
Test();
}
-----------------------
[file mod.cpp]
extern int iGlobalNumber;
void Test()
{
iGlobalNumber = 1;
}
-----------------------
[There is no mod.H file]
-----------------------
BuggyMax
|
|
|
|
|
Thanks, BuggyMax buddy!
Why you use "extern void Test();" two times in main.cpp? It makes me puzzled.
regards,
George
|
|
|
|
|
All the extern keyword does is apply external linkage. If there is a function declaration within a block of code (i.e. a function declaration within a function), it will have to use extern to force linkage outside the function scope.
|
|
|
|
|
Thanks, Dangleberry buddy!
But I have removed one of the two "extern void Test();" statements, and the
program still works OK. Can you explain to me why we need two "extern void Test();" statements here?
regards,
George
|
|
|
|
|
how do i create a 3D visualization of a 2 layer structure? ie supppose i wan to have a 2nd layer (on top of a 1st layer) that follows the contours of the 1st layer(not necessarily flat)?
|
|
|
|
|
Hi all
how can i open a dll to read it's scource code?
Thanks
|
|
|
|
|
The short answer is you can't.
DLLs - and other types of Windows executable files like .exe, .scr, .cpl, ocx, and so on - contain machine code that has been compiled from higher level source languages.
With the exception of open source projects, the original source files - which are separate from the DLL - are almost never provided with an application.
Depending on what you're trying to learn, there may be other ways.
The web is an amazing place to find code that demonstrates how to do almost anything. CodeProject and MSDN are great places to start.
Using development tools that come with Visual Studio, the Platform SDK or sites on the web such as SysInternals, it is possible to view the DLL's external interface. From this, you may be able to learn a bit about what the DLL can do, but not how it does it.
Have a look at "OLE-COM Object Viewer" (Platform SDK) or "OLE Viewer" (Visual Studio 6.0. If the DLL implements COM objects, you can view the type library which show you the interfaces, methods, etc.
"Depends" which comes with Visual Studio lets you look at the functions and data exported by a DLL, as well as what other DLLs it depends on.
Process Explorer from SysInternals lets you see what DLLs a running program is using.
Hope that helps.
|
|
|
|
|
You can't get a DLLs source code from the DLL.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a need to create a setup wizard application that will have to do a lot of the same things as the initial VS.Net setup screen does, such as check system requirements, install required system files etc.
What type of project would I need to create in VS.Net 2003 to enable this to run directly off the CD-Rom on nearly all windows versions?
Chris.
|
|
|
|
|
I've not ever used it but aren't programs created with VS.NET limited to run only on those machines having the .NET framework?
|
|
|
|
|
I've got a web browser control.
It loads a page.
The page has some javascript.
In particular, one variable, an array is defined there.
I want it.
any ideas on how to get it?
|
|
|
|
|
Hello,
I am kind of worried about the following bit of code.. is it possible to have a socket block indefinitely? If so what could cause that?
if(sock == INVALID_SOCKET)
return FALSE;
while(true)
{
int nSend = send(sock,(char FAR*)&sSend, sizeof(sSend), 0);
if(nSend == SOCKET_ERROR)
{
if(WSAGetLastError() != WSAEWOULDBLOCK)
return FALSE;
}
else
break;
}
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
RobJones wrote:
is it possible to have a socket block indefinitely?
No. If there's no error, then it will send eventually. If there is an error, it will not block, but will return the error immediately.
And even if it takes ages to send the data, TCP includes timeouts, so it won't block forever - it will return a timeout error.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
Thank you for stopping by.
I have a number of dlls written for VC++ 6 and I have been asked to make them available to a VB app (perhaps in the form of a .def file).
I would be very grateful to know what or how to go about doing this.
Any pointers would be much appreciated - the possibility of PAID work after so long is certainly a good incentive - I am sure you understand.
Please note that I am a VC++ programmer on version 6. I have yet to transition to .NET.
Thanks
Michael
|
|
|
|
|
Assuming the functions/classes in the C++ are exported, why not just add
Declare Function NameOfFunction Lib "NameOfLib" (ParameterList) As ReturnType
to the top of your VB modules?
|
|
|
|
|
Hi David,
Thank you for responding.
I have never produced a dll so I am completely ignorant of the terms, which I know is going to make this coding difficult. I guess I will have to go away and get familiar with how dlls are coded and generally fiddle around with them, since at this point I don't even know what 'exported' means.
At least you have given me a starting point and thanks for that.
Thanks
Michael
|
|
|
|
|
|
Excellent resource.
Thank you so much! I think this will do it.
Thanks again. You are a star!
Michael
|
|
|
|
|
Hello
I have a HWND of a window and the coordinates of the pixel. How can I get a current color of this pixel?
The window is from another application.
Thank you in advance
|
|
|
|