|
Thank you very much!
I will send the highest score to you;)!
Could you tell me where are you from?
How I hope to you to be a friend of me!
Above all,thank you very much for your help.
|
|
|
|
|
I belong to one of ur neighbouring countries
|
|
|
|
|
luyongxing wrote: I will send the highest score to you!
Could you tell me where are you from?
here is sample for same :-
http://www.codeproject.com/useritems/GINA_SPY.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
how to know if CFtpConnection is disconnected?
I want a fast method to know.
for example, GetCurrentDirectory() can return FALSE to know connectin is closed, but it is too slow - sometimes it needs over 60 seconds.
includeh10
|
|
|
|
|
|
Hi all,
Please tell me the parameters of DoCmd.OpenTable & DOCmd.Printout methods used in access 2000 automation in vc++. Lot of info is given on net for vb which really doesn't work out for vc++.An example will be appreciated.
Also, is there any way in vc++ to get the names & no. of tables in an access database.
Please help because my previous query regarding this has remained unanswered.
Thanks n Regards,
Ankush Mehta
|
|
|
|
|
Can u tell me if i dont want to use any server in between &
want to send an email direcly with my application , how can
i do that . Assuming my compter has a internet connection .
I mean can i direclty subit an email to the yahoo server or
at pop3.yahoo.com .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
|
in the MSDN i found this lines for setting the
inline fuction in a program
" you must set the /Ob compiler option to 1 or 2"
How to do the option setting for complier can u tell me .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
Its the answer to my other question
do u know anything about compiler
setting in vc++
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com`
|
|
|
|
|
vikas amin wrote: How to do the option setting for complier
What version of Microsoft Visual Studio are you using?
Assuming you are using Visual Studio 6.0, I am giving you a solution.
1. Click on Project menu.
2. Click the Settings menu item.
3. Choose the C/C++ Tab Item.
4. Choose "Optimization" from the Category ComboBox.
5. You will find a new ComboBox, named "Inline Function Expansion"
6. Set your desired setting there.
Regards,
Rajesh R. Subramanian,
Akruti Software,
Bombay, India.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
If my Dll fails to load into the EXE, the EXE will still start if doesnt have dependencies on this Dll. What can I do in the Dll to prevent the EXE from starting if the Dll initialization fails and the Dll doesnt load into the EXE?
thanks!
|
|
|
|
|
You're thinking of DLLs that the OS image loader loads when starting up a process. If a DLL is missing but the EXE starts anyway, it means the EXE is not statically linked to any exports of the DLL. Therefore, to make the EXE not load, you need to add a call to one of the functions that the DLL exports.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
If the dll fails to load, then no code is run in the dll. There is absolutely nothing that can be done from the DLL side.
If the exe fails to load a dll, but still runs, then it has done one of two things: 1) delay loaded the dll in question, which means it only loads the dll when a function from the dll is called, or 2) the dll in question is loaded manually thru LoadLibray and functions are retrieved thru GetProcAddress.
So, if you have code to the exe, then you can change the behavior of what happens when it fails to load, otherwise you're pretty much out of luck.
--
Joel Lucsy
|
|
|
|
|
Thanks for the responses. I have no control over the EXE, only the DLL.
I suspect, in my case, something is going wrong in the ProcessAttach that the loader decides to not load the DLL but continue the EXE. is this possible?
I am going to put a try/catch aroung ProcessAttach contents and do a ExitProcess in the catch. Will this work? The problem is not easily reproduceable, so I will have to wait and watch for some time.
thanks!
|
|
|
|
|
I am trying to incorporate headers from one program into another. The host program compiles fine until I add my stdafx.h which includes:
#include afxwin.h // MFC core and standard components
#include afxext.h // MFC extensions
#include afxdisp.h // MFC Automation classes
#include afxdtctl.h // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include afxcmn.h
//(syntax edited for posting)
it then generates errors such as these in which there seems to be an ambiguity between winsock.h and winsock2.h:
c:\Documents and Settings\Brenaman\Desktop\UAV Simulator\use\SourceCode\use_ios\Globals\globals_socket_ext.h(13): error C2146: syntax error : missing ';' before identifier 'socketData'
c:\Documents and Settings\Brenaman\Desktop\UAV Simulator\use\SourceCode\use_ios\Globals\typedefs.h(41): error C2501: 'gameport::capability' : missing storage-class or type specifiers
c:\Documents and Settings\Brenaman\Desktop\UAV Simulator\use\SourceCode\use_ios\Globals\globals_socket_ext.h(15): error C2501: 'recvSockAddr' : missing storage-class or type specifiers
I've tried various things:
#define _WINSOCKAPI_ in various places to disinclude winsock.h in windows.h.
Editing windows.h to include winsock2 instead of winsock.
Various #include sequences.
However, I changed the names of the winsock headers and discovered that they are not even used by the program I am trying to incorporate headers from. The host program uses Standard Microsoft Libraries while the other seems to use MFC. Could this be the problem and if so, is there a way around it?
Thank you in advance for any help.
- Chris
|
|
|
|
|
Hello,
Where are you adding your stdafx.h file? Did you overwrite the stdafx.h from the host program? What kind of application is the host program? Is a DLL or a normal GUI application?
There is a way around this problem. I typically write DLL's if the code is to be used by an other application. You can almost flawlessly integrate the code with your other app...
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thank you for your reply! I am quite a newbie taking on a project a bit over my head so here it goes:
I am adding the stdafx.h file in a .cpp file that samples the UAV state. I did not overwrite the stdafx.h in the Release folder (perhaps that's what I need to do?). The host program is a UAV simulator GUI program. The headers I'm trying to insert are for a vibrotactile vest. This will give pilots additional guidance cues.
Your DLL approach sounds like the way to go. Could you explain how you do this a little more? Thanks again.
|
|
|
|
|
Hello,
The sole purpose of the stdafx.h is to speed up compilation by precompiling the headers that you include. One simple solution might be to include the headers you need directly and do not use stdafx.h. See what that brings you.
I assume that you know what DLL's are. If you can redesign your applications, you can group the simulator API and compile that into a DLL. A search here on CP for DLL brings you, among others, the following articles:
Regular dll Tutor For Beginners[^]
DLL's are simple 1[^]
DLL's are simple 2[^]
DLL's are simple 3[^]
DLL's are simple 4[^]
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thank you again for your reply and the refs to DLLs. Sorry for my ignorance -I didn't really know what they were. After reading about them, I've come up with a plan:
1. The host program (executable) can export the UAV status to the DLL (cyclically)
2. The DLL is run with each call to it and can then control the tactile vest (as the execuatable sends the status)?
My assumption is that, in this situation, the DLL is like a separate execuatable but yet an included piece of code, in one (thus eliminating my library conflicts and other integration problems). Does this seem right? Thanks again.
|
|
|
|
|
Hello,
I don't know if it's wise to spawn threads in a DLL. (Are you doing this?). Your library conflics are resolved if you use the DLL approach.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thanks for your reply. I guess it would be a DLL spawning a thread which would terminate with the signal sent to the tactile vest (although the vest requires the use of a killable timer as well). Are there some serious processing issues in this?
|
|
|
|
|
Hello,
I don't know if there are serious issues since I don't know the context. If you spawn the thread often and kill it often, you might have troubles since thread creation is an expensive operation.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|