|
Hi,
I need to build an app to open some kind of file (it kan be any kind: .exe .html .txt .hex --> really everything) as a binary (or hexadecimal file), after that I need to convert this file to a hexadecimal file with checksums.
I know how to do the last thing, but I could use some help in opening files as binaries!
|
|
|
|
|
If you are using MFC:
CFile MyFile;
unsigned char nByte;
if( MyFile.Open(TEXT("somefile.txt"), CFile::modeRead | CFile::shareDenyNone | CFile::typeBinary) )
{
while(MyFile.Read(&nByte,1))
std::cout<<nByte<<std::endl;
MyFile.Close();
}
I Dream of Absolute Zero
|
|
|
|
|
Hi all.
Why my Visual Studio dont want to inter into source code of MFC by F11 key,alfought formerly all be fine.May bee i change some setting by chance or my VC break down???
Thanks.
|
|
|
|
|
it generally happens when you pass the function call as a parameter to some other function.
for instance
outer_func(inner_func());
when the control reaches on this line and you press F11 the control enters the source code for inner_func(), but if inner_func() doesn't return a correct value then the control won't enter the source code for outer_func().
never say die
|
|
|
|
|
Hi!
I'm trying to build a speech application with Visual C++ using Microsoft Speech SDK 5.1 in Spanish but the Lhtts engine for this language sounds as C3PO and I need it sounds like people more or less. I only should use few words so, does anybody know what could I do to use my voice in .wav or .mp3 to read what the user writes?
Thanks a lot!!
I don't know anything...But I'm trying
|
|
|
|
|
Hi All,
I could not see the contents of CComboBox when I try to create in the heap.
Cany one give me the soultion.
Thanks,
|
|
|
|
|
When creating a combobox dynamically ,you need to define the drop list height.
Otherwise, clicking on the drop button won't open the drop list.
The way to do this is by calling
SetWindowsPos(NULL,0,0,cx,cy,SWP_NOMOVE | SWP_NOZORDER);
Goodluck,
Dudi
|
|
|
|
|
I'm using a library in my MFC application and i'm having some memory problems with allocations and deallocations, some memory allocations/deallocations causes a crash but only if it is not running on debug-mode. In debug-mode the application runs perfectly. Here's my lib configurations:
engine.lib ( Non-MFC Code ):
. Configuration Properties:
----. General:
------. Configuration Type: Static Library ( .lib )
------. Use of MFC: Use Standard Windows Libraries
----. C++:
------. Code Generation:
---------. Runtime Library: Multi-Threaded Debug ( /MTd )
editor ( MFC Code ):
. Configuration Properties:
----. General:
------. Configuration Type: Application ( .exe )
------. Use of MFC: Use MFC in a Static Library
----. C++:
------. Code Generation:
---------. Runtime Library: Multi-Threaded Debug ( /MTd )
------. Precompiled Header:
---------. Create/Use Precompiled Header: Automatically Generate( /YX )
----. Linker:
------. Command Line: /NODEFAULTLIB:LIBCD.LIB
Noticed anything wrong ? Any tip ?
Thanks
|
|
|
|
|
It is nothing to do with your configuration. It very likely cause by your code.
The reason it won't crash in debug mode is that your linker allocates more storage space for each memory blocks in your program for debug purposes. So, even if your program leaks, the extra space storage save you from crash. This is not going to happen when you are in release mode as when your linker allocate exact storage space for your program.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi
does ne1 know the best way to do a http post ?
thanks
simon
|
|
|
|
|
Use CHTMLView (MFC) or use IE COM object.
Or look for low level http protocol helper class in codeproject.(if any)
Hope this helps
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
Check out HTTP 1.1 protocol.
http://www.w3.org/Protocols/rfc2616/rfc2616.html
Kuphryn
|
|
|
|
|
I need to create a CBitmap using data buffer. To insert into a image list
|
|
|
|
|
I all, i am becoming mad for this problem!
i am using ShellExecuteEx to launch an external program.
When i pass parameters these must be separed with spaces, then
if i pass the parameters "pippo.txt pluto.ppp", my program work fine,
but if pass "c:\Documents and Settings\.....pippo.txt pluto.ppp", then
the word "and" is used by ShellExecuteEx as parameter,
then how can i quote the spaces???
The voice is inside us
|
|
|
|
|
use \" to put a quote in string
CString str = "\"test.exe\" test.doc"
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
i have done it but don't work!!!
Leto
|
|
|
|
|
Placing space in the parameter traditionally is considered as end of the parameter, So i guess you need to apply some logic to avoid space where needed and where not. like passing "Program files" as "program_files" and then remove the _ in the program to whome you are passing the paramter.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
you'll probably need to enclose your full filepath in enclosing quotes. e.g:
<br />
CString strFilepath = "\"c:\\program files\\this file.txt\"";
I Dream of Absolute Zero
|
|
|
|
|
NOW IT WORK,,, thank you very much!!!!!
|
|
|
|
|
Hi Guys,
I am getting a very strange error when every I pass the CStringArray to the function.
the error is "cannot convert parameter 4 from 'class CStringArray' to 'class CStringArray'"
Any idea.
Thanks,
Best Coder
|
|
|
|
|
Pass your array by reference, instead of by value.
Something like:
void SomeFunction(CStringArray& arrParamArray);
I Dream of Absolute Zero
|
|
|
|
|
I successfully Solved the problem.
Thanks a Lot.
"And they do not show off their charm (Zeena) except only that which is apparent and let them draw their head coverings (khumur) over their necks and bosoms (juyub)"
|
|
|
|
|
Is there a way to get a function name in a macro? Something similar to __FILE__.
Basically I use the class name and function name in debug statements through-out my code and I want a way to automate the insertion of these values. Ideally I want the values at compile time.
Thanks
Mike
|
|
|
|
|
Functor or pointer to function?
Not sure if this is the thing you want.
Sonork 100.41263:Anthony_Yio
|
|
|
|