|
Hi.
I am newbie to this website. I have some questions. My first question is about how to implement self-extracting installers? These programs have the ability to extract files stored within their executables. Secondly, most programs including compilers have the ability to create brand new .EXE files. I know that i can write an interpreter of any new or old language but how to make an independent EXE which can run without the interpreter?
Thanks in advance.
Waiting for your replys.
I just looked around this website. I must say that it is a very nice site for programming. Comprehensive articles are also available. A complete separate section for MFC controls, including subclassing, etc. I also liked the DirectX section. Complete game making like Tetris, RaceX, etc. is given which helps not only to understand game programming but also to inspire our own ideas. Keep up the good work
|
|
|
|
|
If all you need to do is create a single-EXE installer, then try Inno Setup[^].
Software Zen: delete this;
|
|
|
|
|
hi,buddies. Happy new year!
The problem of mine is:
I have a series of bmp. I wanna to make them into AVI. I have used AVI*** funtion in vfw32.lib to do this job. And i used ICInfo function to collect all installed codec in windows system. The problem is that why not every "fcchandler" got by ICInfo can be used by AVIMakeCompressedStream?
who knows the secret?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi
I want to display to the user if the WEB site,that he is is protected by SSL.
For this i want to get from the WEB server the client certificate object.
I have a problem to send the request to the server.
This is my code
HINTERNET hOpen, hConnect, hReq;
DWORD dwFlags = INTERNET_FLAG_NO_CACHE_WRITE |
INTERNET_FLAG_KEEP_CONNECTION |
INTERNET_FLAG_IGNORE_CERT_CN_INVALID |
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|
INTERNET_FLAG_PRAGMA_NOCACHE;
char *lpBuffer, szData[51];
INTERNET_PORT dwPort;
wchar_t* accept[2]={L"*/*",0};
if ( !(hOpen = InternetOpen ( "HeadDump", INTERNET_OPEN_TYPE_PRECONFIG , NULL, NULL, 0) ) )
{
ShowError ( GetLastError(), "InternetOpen");
return false;
}
if ( !(hConnect = InternetConnect ( hOpen, url, dwPort,""/* user*/, ""/* password*/, INTERNET_SERVICE_HTTP, 0 , 1) ) )
{
ShowError (GetLastError(), "InternetConnect");
return false;
}
if ( !(hReq = HttpOpenRequest (hConnect, "GET", url, "HTTP/1.0", "", (const char**) accept, dwFlags ,1 )))
{
ShowError (GetLastError(), "HttpOpenRequest");
return false;
}
again:
//Resolver::Trace("Send Request = " + data);
std::string header = CONTENT_TYPE_STR;
if ( !HttpSendRequest (hReq, // handle from HttpOpenRequest
NULL,0, NULL,0) )
{
ShowError (GetLastError(), "HttpSendRequest");
dwFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA |
SECURITY_FLAG_IGNORE_REVOCATION |
SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP |
SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS |
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
if ( !InternetSetOption (hReq,
INTERNET_OPTION_SECURITY_FLAGS,
&dwFlags,
sizeof (dwFlags) ) )
{
ShowError(GetLastError(),"InternetSetOptionFailed");
return false;
}
}
I'm new in VC++.
Help me please with my question
|
|
|
|
|
Hi all:
I want to write a web link to Favourites folder, How can I do that. I know how to get the system Favourites folder directory. other than that I don't have any clue.
|
|
|
|
|
|
MFC Supports Print preview only for applications with Document/View Architecture. I'd like to print from the Modal dialog and also want to have Preview Dialog. Any Samples already there?
|
|
|
|
|
There sure is. Take look in the printing section. I have presented a base class to use instead of CDialog there which gives a CDialog the same interface as a standard CView for printing
If you vote me down, my score will only get lower
|
|
|
|
|
If C++ already supports the C Standard Library, why do
we need to declare extern "C" when using C-linkage?
When do we use extern "C"? Is this compiler-specific
feature? Or is it defined in the standard ANSI C++?
On MSDN, it says Microsoft C++ supports the strings
"C" and "C++" in the string-literal field. However,
I have never seen something like extern "C++". Has
anyone seen it? Will we ever need to use extern "C++"?
Thanks
|
|
|
|
|
Hello Alex,
The extern "C" declaration is used to tell the C++ compiler not to mangle the symbol which is being declared.
When the C++ compiler encounters a function name like "DisplayCurrentThreadId()" which has not been declared as extern "C", it will emit a symbol for it which will look like the following :
?DisplayCurrentThreadId@@YAXXZ
The actual symbol produced depends on the compiler used (the above was produced by VC++ 6.0). This symbol will be used in the resulting OBJ file for linking purposes.
C++ has a variety of reasons for symbol name mangling, of course. But the reason for the mangling of function name (both class functions and global ones) is to enable function name overloading (i.e. using the same function name with different parameter types).
If extern "C" was used to declare the function, the symbol produced for it could be :
_DisplayCurrentThreadId
This depends on the compiler used. But the bottom line is that no function name overloading will be allowed (since the C language does not support this, hence extern "C").
Hope this helps.
Best Regards,
Bio.
|
|
|
|
|
Bio,
Thanks for your reply. I have one more question, does
the term extern "C" has anything to do with the storage
specifier extern?
Now that I understand name mangling, I wonder if extern "C"
is a C++ language feature, or is it compilers' feature?
|
|
|
|
|
Alex Ngai wrote:
does
the term extern "C" has anything to do with the storage
specifier extern?
no, not at all.
Alex Ngai wrote:
I wonder if extern "C"
is a C++ language feature, or is it compilers' feature?
C++ standard specification.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
extern C++ is defined in the standard to mean do whatever the compilers default C++ is.
since this is the default it is almost never used.
|
|
|
|
|
Hello!!
Can anyone suggest source code/article on how to read/view multi-page TIFF files..
Thanks?
|
|
|
|
|
what is a "multi-page TIFF" ????
isn't a TIFF file a picture ? this way, how can a picture be multi-page ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i already got CxImage to read/view TIFF files... i searched it here in codeproject..
TIFF is a file format for handling fax images.. Its multi-page because, one .tif file can have 1 or more bitmap( frames) on it....
|
|
|
|
|
How can I find out if the window with input focus belongs to a certain process?
I do have a process handle, basically, I want to know if a child process has input focus.
we are here to help each other get through this thing, whatever it is Vonnegut jr. boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
You can call GetWindowThreadProcessId() to get the process and thread IDs that created a window. Not sure how you convert from a process ID to a process handle, but hopefully that'll help.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
Magnae clunes mihi placent, nec possum de hac re mentiri.
|
|
|
|
|
Michael Dunn wrote:
how you convert from a process ID to a process handle
I think This Api Will Help OpenProcess ,it return Process Handle based on PID
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi All,
i am new to networking . I am trying to make a client server chat system. I need some help to start with , like tutorials on socekt programming.
can anybody help me with this?
Thanks
bye
elec
|
|
|
|
|
|
In the Win32 API (or atleast I think it's in the Win32 API), the AsyncKeyState function can be used to see if a keyboard button is pressed.
Does anyone know the code for the buttons on the keyboard? I arleady know that the arrow keys are VK_UP, VK_DOWN, VK_LEFT, and VK_RIGHT, and the "Enter" button is VK_RETURN.
Thanks!
|
|
|
|
|
|
I see. But what about the letter keys. All the list says is, for example: (48) H Key; (4D) M Key
How would you use that in code when trying to do something like this:
if (GetAsyncKeyState(VK_LEFT) < 0)
{
//result of key press here
}
Instead of using VK_LEFT, how would I use the letter "M" or the letter "H"?
Thanks again!
|
|
|
|
|
(48) H is an example of the value of the constant. All the VK_* are is constants defined for a particular value.
I suppose Microsoft didn't think it was necessary to define VK constants for printable ASCII characters, especially since the values are the same as the ASCII character code. So, the key constant for "A" is 0x41 (65), as well as the ASCII value. This makes it easy to translate key codes to printable ASCII characters.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|