Although you have posted in the Windows API forum, the sample code you reference is for .net c++/clr and it will compile fine if you set the clr switch in your project. The syntax is different - but...
You can't simply use a file name if you expect to find a file in the virtual store folder. This assumes that your current directory is already set to the virtual store folder which is probably not a...
I have a COM Automation class that impelents a dispatch interface and coclass, and this project generates an ODL file that, in turn, generates a .tlb file (TypeLib). In the ODL file, I see something...
I have a COM Automation object based on the MFC CCmdTarget class and one of its properties is a date/time stamp. Internally, the application acquires date and time via the SYSTEMTIME structure and a...
No, it does not make sense. What you have done here is stumble upon a solution that just happens to work. You should never use code like this in a project. What you need to do is address the real...
With all due respect to your outstanding reputation here, it all boils down to whether or not you agree that 1/40 of a second is a long time to access a database record from a local C program, do...
I am by no means an expert on databases, but if it really does take three days to do 10 million updates then that works out to about 38.58 calculations per second - or 25.92 ms per calculation -...
(1) CFile::typeText | CFile::typeBinary - Conflicting types, besides being irrelevant for CStdioFile which always uses CFile::typeText regrardless of what...
Two threads walk into a loop. Thread 1 says to Thread 2: "Who was that critical section I saw you enter last night?" Thread 2 says: "That was no critical section, that was my mutex!" bada booom!
You are not understanding the suggestion to debug it. You need to step into the MFC source code and determine exactly where the call is failing. MFC uses various time-related functions (time(),...
There is nothing wrong with the conversion in your code. The problem is in reading the text file. I suspect that you are using a basic text editor that assumes ASCII characters and can't correctly...
In an MFC project I want to add a wrapper class for an external COM object so I use "Add class from type library" and it generates an MFC class based on COleDispatchDriver. How do I do the...
CString has an LPCTSTR (long pointer to constant 'T' string) operator which will return a pointer to the string data. All you need to do is cast that to a const void pointer.
The field is an unsigned short so the range is 0-65535 subject to port availability as suggested in the list above. Note that lists like this are only a very general guideline since the majority of...
If your need is to simply determine the digits in PI and not use this extended precision number in any calculations, then all you need is an algorithm. Sorry that I can't suggest one, but a Google...
There's still something missing from your question. Simple loan amortization is relatively easy to calculate (for example, see http://www.hughchou.org/calc/formula.html). But using the standard...
In general, yes, it is possible for UNICODE and ANSI to co-exist in a project where the application is of one type and the dll of another - it just requires a bit more care when exchanging strings...
IDispatch, which is derived from IUnknown, is the basic object used for the Windows COM interface. Windows supplies an IDispatch for numerous objects and working with the IDispatch and IUnknown...