-
- HANDLE and FILE*
by George2
- 3 Replies
- Last post
by Simple Samples
- Hello everyone,
I am using Windows API open (create) a new file by CreateFile,
http://msdn2.microsoft.com/en-us/library/aa363858.aspx
the return value is HANDLE, if I use fwrite to write content to the file, since fwrite requires FILE* as parameter. I think HANDLE is not the same as FILE*, right
Are there any ways (or methods) to transform HANDLE to FILE*
I have tried that passing
-
- VC++ 2005 C++/CLI link times
by Pawnder
- 2 Replies
- Last post
by Pawnder
- We have a large (1MM+ lines) C++ program that compiles and links to a single EXE. The project can be built as a native application, or as a managed app (/clr). The managed build includes some new features which take advantage of the .NET framework and, going forward, we'd like to do future development using .NET.
The problem is the managed link time. When we're working on the project in nat
-
- About dialog Resizing properties border
by YaelS
- 6 Replies
- Last post
by YaelS
- Hi,
I'm tring to set Resize able to mt dialog, but if I drag the border I get runtime error:
Unhandled exception at 0x0040a91e in QmAgent.exe: 0xC0000005: Access violation reading location 0x0000001c.
afxwin2.inl - (here it's break)
_AFXWIN_INLINE void CWnd::GetWindowRect(LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }
I don
-
- How to: Implement 'Always on Top' option
by Alireza Noori
- 4 Replies
- Last post
by shaper
- Hi, I wanted to know how I can create an 'Always on Top' option for my application (both managed and unmanaged approaches)
Please help me to do this.
-
- F1 Help in Visual Studio 6.0
by VSAT
- 3 Replies
- Last post
by Damien Watkins - MSFT
- Hi,
I am using visual c++ 6.0 and MSDN Visual Studio 2005. I want to link the MSDN to visual c++ 6.0, i.e. if i press <F1> in visual studio 6.0, it should automatically invoke msnd. Any thoughts.
thanks,
VSAT
-
- money output
by Rick Doll
- 5 Replies
- Last post
by Rick Doll
- A code for printing the value of a number to money format in C# to a console screen is like this:
Console .WriteLine( "The total charge for painting your home is {0:c}{1} " , iTotalCharge, "." );
Is there a similar way for doing it in C++ I have not found it yet.
-
- serialport problem(Quick-no time)
by hgedek
- 1 Replies
- Last post
by Simple Samples
- Project has 3 module.GUI-communication-serialport We used QT for GUI because of Linux. In console aplication ,project was exceuted well.But when used GUI ,project began to crashed because of ReadFile(). ReadFile should wait the port until signal.How can I solve this
GUI
s.listeningPort(); //s is a communication object
communication
srlObj.readMsgFromPort(); //srlobj is a serialport obj
-
- Converting C to C++
by dellthinker
- 2 Replies
- Last post
by TilakGopi
- Hi all. I've taken the liberty in "dissecting" some code so i can understand it better. However, im having a hell of a time trying to figure out how to convert it from C to C++ . My error is this: error C2664: 'recvfrom' : cannot convert parameter 6 from 'unsigned int *' to 'int *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-sty
-
- MFC-How to add CDialog into CPropertySheet
by leon123
- 10 Replies
- Last post
by Simple Samples
- I want to add dialog(not CPropertyPage) into propertysheet. Is it possible And how to make it.
Thanks!!
-
- What #include<file> is necessary for using namespace System;?
by Rossel
- 7 Replies
- Last post
by Sridhar P
- The Visual Studio 2005 MSDN Help Search doesn't explain the prerequisite #include<file> needed before the System namespace can be called, for example, in the case it were needed to execute the following statements:
using namespace System;
Console::Clear();
Does anyone know this necessarily perchance Thanks.
-
- Problem of using Unmanaged memory in VC++6.0
by krishnasamy
- 4 Replies
- Last post
by krishnasamy
- Hello,
I am writing a DLL for Capturing the Image from Camera Device using Camera SDK DLL.
All the calls made to functions in Camera SDK DLL are working properly as I am able to get a return value of zero.
I am able to get the image data as unmanaged memory address(pointer) as a result of a functions call to the camera SDK. I do not know how to display this data directly in the i
-
- Hex to std::string Help!
by Stefano_Azzi
- 4 Replies
- Last post
by Stefano_Azzi
- Hi all!!
With this code i get an Hex string from an encrypted string.
Code Snippet
std::string toHex( const std::string& data)
{
std::ostringstream hexStream;
hexStream << std::setw(2) << std::setfill( '0' ) << std::hex;
for (std::string::const_iterator i = data.begin(); i != data.end(); ++i)
{
hexStream << static_cast &l
-
- term does not evaluate to a function
by Indiana
- 2 Replies
- Last post
by Indiana
- I have a problem with the following class:
Code Snippet
//BTC template <class T> class BTC { typedef BTCNode<T>* (BTC<T>::*CompressBlockFunc)(Array2D<T>* block); private: CompressBlockFunc compressBlockFunc_; protected: list<BTCNode<T>*>* compress(Array2D<T>* image, int blockXSize, int blockYSize, CompressBlockFunc compressBlockFunc);
-
- 'Deploying' (?) C++ release executables.
by Goldstein
- 5 Replies
- Last post
by succubus602
- Forgive me if the subject of this question is misleading: It has suddenly dawned on me that each and every possible use of the internet relies entirely upon keywords. For anyone in my current situation, unable to guess the correct keyword for what it is I'd like to do, navigating the great wealth of admittadely very useful information available to us online is near enough impossible. 'Deployment',
-
- low level function
by hcong
- 2 Replies
- Last post
by hcong
- can i call very low level functions in asm language like masm
high level api functions can easily hook by other program or virus.
i want my program call low level functions that imposible to hook by other program.
like keybd_event, after trace, it will finally reach asm code
MOV EDX,ESP SYSENTER
so can i directly call the sysenter
-
- unresolved external symbol __invalid_parameter_noinfo
by MukilanP
- 12 Replies
- Last post
by joeku98
- Hi friends,
We are building a sample project in debug mode with release build of library say test.lib we got error like "error LNK2001: unresolved external symbol __invalid_parameter_noinfo". Can anybody give solution for this problem
Regards,
Mukilan
-
- Makefile newbie - don't know where to start
by JGLP
- 5 Replies
- Last post
by JGLP
- Hi everyone I already search for "makefile" in msdn and i found a lot of stuff. Too much stuff that i really dont know where to start . I don't think i found what i'm looking for: I have on a folder one project created on visual c++. On the same folder, i have all the project files, cpp/h files , etc. And i have another application (this time only the executable *.exe) inside the same fo
-
- Mixed Mode : Should definitions be in the headers when creating static mixed lib?
by Sunkyu Hwang
- 4 Replies
- Last post
by Sunkyu Hwang
- Hello,
I am trying to use some .NET stuffs inside already existing native C++ source pool.
I experienced wierd "unresolved symbol" error and ultimately solved the problem but cannot explain why.
Could anyone please tell me what I did Thank you very much,
[ Problem Source Files ]
MixMode.lib (static lib created with /clr)
// ========= "MixMe.h&q
-
- Function Definition - pointers
by amal_1985
- 3 Replies
- Last post
by M Kamal
- I need to have a function that returns an address of the first element of the array or pointer basically and be able to read this pointer from another function. I am not sure about the syntax, I keep on getting errors. Here is what I tried:
Code Snippet double* get_vector(); // supposed to return a pointer //in the function, at the end I return an address of a variable
t
-
- DDK
by nitin321
- 3 Replies
- Last post
by Bruno van Dooren
- hai, i wish to learn windows driver development, someone plz suggest me nice book or any other internet tutorial links... thanks & regrars
-
- file seek then read thread-safety
by b1st
- 6 Replies
- Last post
by Sdi
- Hello, I have a class that exposes file seek and file read functionalities. A single instance of this class opens exactly one file and can be used in more than one thread. So my question is can thread B seek and change the read pointer while thread A is reading the same file and therefore cause the read function in thread A to return unintended data I'd been convinced that this scenario is in fact
-
- First Execution Only...
by SpunkyMan
- 14 Replies
- Last post
by Simple Samples
- Hi, I've been trying to tell my new program to check for a specific condition (whether it is the first execution or not), but I'm having quite a bit of trouble. In fact, it's driving me insane. I spent almost all of last night trying to get this right, but it simply will not work the way I want it to. I've asked a huge number of people for help on message boards across the net, and nobody has been
-
- Ambiguity of "<" and ">" symbols in C++
by mgio
- 9 Replies
- Last post
by n0n4m3
- The "<" and ">" symbols are used as both comparison operators and template parameter brackets in C++ and thus are ambiguous. The following code fragment will not compile under Microsoft Visual Studio C++ 2005 (and 2008 beta):
template < class T> struct ShowListLength<T, typename EnableIf<(TypelistLength<T>::value < LONG_LIST)>::type>
-
- Linker Error
by NehaRahul
- 4 Replies
- Last post
by NehaRahul
- Hi,
I have taken the Microsofts SDKs ColorTranslationSample from Vista PC from the Path c:\Program Files\Microsoft SDKs\Windows\v6.0\ samples\Multimedia\gdi\WCS\ into seperate folder. I followed the building procedure for this sample as given in the following link http://msdn2.microsoft.com/en-us/library/ms716692.aspx where it is given as building the sample from command prompt using vcbuild c
-
- font problem courier new
by happymozart
- 4 Replies
- Last post
by happymozart
- Hello Please explain me the different behavior #include "stdafx.h" #include <windows.h> #define DEBUG #include <dprintf.h> int main(int argc, char* argv[]) { HFONT font; LOGFONT myFont; HDC testDC; SIZE fontSize; UINT i; BOOL rc; testDC = CreateCompatibleDC(0); memset(&myFont, 0, sizeof(myFont)); myFont.lfWeight = FW_MEDIUM; myFont.lfCharSet = ANSI_CHARSET;