|
you can display Message Box and call MFC in Win32 Console Applicationscreated in VC++
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
That is a Win32 Console Application which you can do GUI in. With DOS applications you can't deal with GUI.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
I found that gethostbyname() would be failed if I disconnected the cable from the LAN adapter. However, if I re-connected the cable to the LAN adapter, it worked fine.
More info is:
If the cable is disconnected from the LAN adapter, ipconfig command will return the following:
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Any idea?
Thanks in advance,
lauch.
|
|
|
|
|
getHostByName() retrieves information from the DNS or WINS server. If you unplug the cable it has nowhere to look for the information.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Thanks, Roger Wright.
Then, if I unplug the cable, how can I retrieve the IP address of the local machine?
I have used the following ways, but all they are failed:
1. Use API getaddrinfo()
2. Use API GetAdaptersAddresses()
3. Use INTRFC.exe sample, which in turn use the API WSAIoctl(s,
SIO_GET_INTERFACE_LIST, NULL, 0, &localAddr, sizeof(localAddr),
&bytesReturned, NULL, NULL);
In addition, I know the IP addresses are stored in the regitry. However, I want to use other ways to IP addresses if the cable is unpluged.
thx,
lauch.
|
|
|
|
|
I am having trouble getting a CPropertySheet to not fail create. I've set it up like this example:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cpropertysheet.3a3a.create.asp
The differences are its not in a CView derived class. Does that really cause the Create to fail? It will be a huge pita to derive the outer class from CView.
I'm getting Assertion failed in dlgprop.cpp line 201, no other information.
|
|
|
|
|
The type of the parent view does not affect a property sheet.
Kuphryn
|
|
|
|
|
help me
i learn c++(programming language).you help me anyway.
(eg. books or website)
you new friend
than naing nge
Myanmar(burma)
|
|
|
|
|
Hello,
http://www.research.att.com/~bs/C++.html
http://www.cplusplus.com/
http://www.msdn.microsoft.com/visualc/
http://www.codeproject.com;P
http://www.codeguru.com
With Regards,
R.Selvam
|
|
|
|
|
use some good book like "Thinking in C++" "Effective C++" "The C++ programming language by Bjarne Stroustrup"
and offcourse
codeproject.com
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
If you have programming experience and want to learn C++ (as opposed to learn programming), I can recommend "Accelerated C++"[^] by Andrew Koenig / Barbara Moo.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
"Thinking in C++" by bruce eckel is free and hardcore, but if you are very new to c++, i recommend that you open C++ complete reference first and then go for Thinking in C++, and C++ is in you!!!
cheers
Balkrishna Talele
|
|
|
|
|
I compiled my project at home without any errors but when I opened it on another pc and edit the code, the compiler encounter error: cannot open include file 'afxdao.h': no such file or directory.
Hwo to resolve this?
|
|
|
|
|
Hello
afxdao.h file missed in your system. So, you can copy afxdao.h file in to VC++ program files include directory.
With Regards,
R.Selvam
|
|
|
|
|
I compiled my project at home without any errors but when I opened it on another pc and edit the code, the compiler encounter error: cannot open include file 'afxdao.h': no such file or directory.
Hwo to resolve this?
|
|
|
|
|
check if path of INCLUDE directory is right one
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
Hi,
I know of ReadFile, ReadFileEx and ReadFileScatter.
Are there any other (perhaps lower-level) functions that can be used to read data from files?
Specifically, I would like to know which function DirectShow uses when playing a WMV file (more percisely - which function the filter DS loads calls).
I know that it is not one of the 3 mentioned above...
Thanks in advance,
Oz
|
|
|
|
|
crt functions like fopen
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
They use ReadFile behind the scenes.
|
|
|
|
|
U can use fstream class object and use its functions like read
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
are there, to read from files.
fread, fstream - they all use ReadFile (or ReadFileEx) internally.
I want to know what Win32 API functions are there, to read from files.
|
|
|
|
|
ReadFile is the most low level API call you cant get for reading directly from a handle, but there is also a more sophisticated way to read a file.
You could create a memory mapping of the file and then use any developer tricks you can dream up.
An example: If the file is a bitmap file, then you can cast the void * you get from the mapping to a struct BITMAPFILEHEADER *, and then read from the members of that structure.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Thank you for the elaborate resposne
Unfortunately, I found out that this also is not the way DirectShow reads WMV and ASF files (I found it out using API hooking).
Any chance that it uses some sort of direct disk access? Or maybe reads the file in a different process and streams the data through COM to my process?
Any other ideas?
Thanks!
|
|
|
|
|
The whole point of DirectX is to be an abstraction layer that hides the awfull truth which is: If a DirectX driver for the given hardware exists, in your case this is the soundboard driver, then the features of that driver is used. If such a driver does not exist, then DirectX will emulate the DirectX functions, using the usual Win32 API calls.
So, what you are looking for is not an API call, but a way to access the hardware directly which is not at all like reading a file (unless of course you are used to read files in assembler ).
But why not use DirectX then?, if there is a difference in performance compared to the ASM solution, then it is a very small one.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Thanks again for taking the time to reply everytime
Would you like to continue the discussion in email?
At any case - what I actually want to do is override the DirectX function calls so that my code will intercept every reading from the disk and modify the data that is being read...
|
|
|
|