|
Unless you've got additional info, you're in big trouble. Please note that any sequence of bytes can be interpreted as chats or floating point value. The format of the file somehow must allow you to interpret what kind of data comes next. As for the little-endian big-endian issue, in this post of mine I provide a small routine to do the conversion.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How can we see the memory used by the DLL which is again used by the exe?
|
|
|
|
|
Is there a way to create an Access database programmatically without having access installed?
Please help!!
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
ADOX.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I have a thread which launcher another application using ShellExecuteEx(). The problem is, the calling thread is NOT wating till the new Process gets launched.
Is there any way to delay the calling thread until ShellExecuteEx() finishes its job? Or is there any other solution for this???
Thanx in advance.
|
|
|
|
|
Srini Kella wrote:
Is there any way to delay the calling thread until ShellExecuteEx() finishes its job?
WaitForSingleObject()<br />
WaitForSingleObjectEx()<br />
WaitForMultipleObjects()<br />
WaitForMultipleObjectsEx()
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"It was a blind man who taught me how to see." - Aerosmith
|
|
|
|
|
The Wait* functions are not going to work because, once the ShellExecute returns, the corresponding new process will already be in non-signalled state.
I got a work around:
My new process has a got window. So, I delayed the calling thread using EnumWindows() in a loop. EnumWindows() checks for the new window!!
Anybody has got a better solution for this, Please!!
|
|
|
|
|
It will work depending on what you want to do. If you are waiting for the process to finish, then use...
WaitForSingleObject(hProcess, INFINITE); // INFINITE = -1
When the process terminates, it'll return. -1 means it'll wait indefinitely. I thought that's what you wanted, but if you only care about having the window created in the new process then see if this works...
WaitForInputIdle(hProcess, INFINITE); // INFINITE = -1
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"It was a blind man who taught me how to see." - Aerosmith
|
|
|
|
|
I am not waiting for the process to finsih. I am waiting for the process to begin 'fully' instead! Thanks anyway.
|
|
|
|
|
I have a function that returns _variant_t value .
I need to trap this value in a CString object
Please help
|
|
|
|
|
include the atlconv.h header file in your stdafx.h. This will give you access to the STL string conversion macros. then at the top of your function where you are going to convert the variant_t add this:
USES_CONVERSION;
It is a macro that gives you access to the conversion macros for that function. THen to do the conversion do this:
variant_t vResult;
...
CString str;
str = OLE2T(_bstr_t(vResult));
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
kilowatt wrote:
atlconv.h header
kilowatt wrote:
STL string conversion
The ATL headers have NOTHING to do with STL. variant_t is a Microsoft wrapper around a Microsoft type. OLE2T is also not needed. A _bstr_t contains a wide and a narrow char string, and converts between them implicitly.
CString str(_bstr_t(vResult));
should work, if not it just needs a cast to const char * like this:
CString str ((const char *)_bstr_t(vResult));
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Hello,
I want to do an exe (or the code) that when you execute it, it does like you pressed the "Enter" key.
Thanks
|
|
|
|
|
this seems kinda strange to me.. if you have to double click on the .exe to make it run, and all you want it to do is press enter does that seem harder than just pressing enter?
in any event, even if you do send a message that enter was pressed it would have to be done in a specific window, so you would have to figure out which window to send the enter keypress to (i think)..
maybe some more details or a better explanation?
-dz
|
|
|
|
|
Hi,
I want to write some code to link with my mobile phone. It is a Nokia 8210 and i have the serial data cable. I am fed up with the poor software suplyed and would like to send & receave text messages from & to my pc screen via the phone. Being able to up & down load logo's & ring tones would be a bonus. Does anyone have any pointers?
- How do i do I/O with RS232 com1?
- What does the phone require e.g. nokia commands?
Thank you in advance.
An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
|
|
|
|
|
I have experience fatal error C1001: INTERNAL COMPILER ERROR
when I tried to implement my code in OOP in VC++ 6.0. I have
tested fine in normal C++ code.. here's a bit of the code.
#include <complex>
void Utility::manexp(complex<double> c,complex<double> &mantss,int &iex)
{
mantss=c*pow(10,-iex);
}
There are something wrong with the multiplication here. I have tried
to take out the multiplication.. and there is no complier error.WHat is happening here? Just the compiler freaking me out here?
|
|
|
|
|
try writing the function like this:
void Utility::manexp(complex c,complex *mantss,int iex)
{
*mantss=c*pow(10,-iex);
}
|
|
|
|
|
Thanks for your reply. I have solved the problem for now.I think there is some problems with the complier in recognising what the type pow is supposed to be. I have used a dummy variable of double type. Then passing the pow value to that dummy and multiply it to mantss. It works this way as it make the compiler to recognise it's a double type.
|
|
|
|
|
Hi,
I have implemented some command line functions for my VC++ application which basically performs some serial communication functions with a device.
How do i debug the command line functions?
Thanks,
ravi.
|
|
|
|
|
in the Project / Settings / Debug dialog, there's a place for you to enter your command line.
-c
Cheap oil. It's worth it!
|
|
|
|
|
Visual Studio 6sp5 (c++) won't accept to edit resource strings wit a certain length. Is Windows originally suffering from this weakness, and making this limitation in VS necessary, or it is just a weakness?
Hugo
|
|
|
|
|
I think it is Visual Studio problem. I have the same problem with some very long SQL commands.
You can open *.rc files in any text editor and edit them. Resouce compiler accepts longer strings than VS. Sorry, I do not know limits.
|
|
|
|
|
MSDN says a string "must be no longer than 4097 characters".
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
How can 9 bit data be transmitted and received serially? I worked with 8 bit data before, but how does it work for 9 bits? Thanks very much in advance!
|
|
|
|
|
How can 9 bit data be transmitted and received serially? I worked with 8 bit data before, but how does it work for 9 bits? Thanks very much in advance!
|
|
|
|