-
- _VALIDATE_CLEAR_OSSERR_RETURN failed
by EricBo2007
- 1 Replies
- Last post
by EricBo2007
- I have an debug assertion while running this code :
s = socket (AF_INET, SOCK_DGRAM, 0);
if (s == -1)
return -1;
_close(s);
It occurs in _close() from file close.c with code
_VALIDATE_CLEAR_OSSERR_RETURN((fh >= 0 && ( unsigned )fh < ( unsigned )_nhandle), EBADF, -1);
_nhandle = 0x20
fh = 0x1754
I find this behaviour since I compiled with VC2005. I
-
- Native C++ Win32/API + operater overloading.
by Nathan573431
- 13 Replies
- Last post
by Simple Samples
- Hello, I am working with a Native C++ Win32/API project, and I've ran into an unfixible problem. Well, it's unfixible for me.
When I do something like:
Code Snippet
int Five = 5;
SetWindowText(m_hExampleEditBx, "Five = " + five);
That's just an example, but I do get a errors. Exspecially when I do something like
Code Snippet
int i =
-
- Upgrading from Microsoft Visual C++ 6.0
by Humots
- 3 Replies
- Last post
by Bite Qiu - MSFT
- I would like to upgrade to Microsoft Visual Studio 2005. I currently have Visual C++ 6.0. Does Visual C++ 6.0 qualify as an upgrade for the Microsoft Visual Studio Standard 2005 Upgrade, or do I have to buy the whole package Thanks.
-
- How to build the unicode and non-unicode projects together.
by Robert Wang
- 0 Replies
- Last post
by Robert Wang
- Hello,
I have created a workspace in VC6 and put several projects into it.
some of these projects need to be built with unicode and the other need not.
I have some problems when building them together.
for example:
project1 had two configurations: Win32 Debug , Wind32 Release
project2 had two configurations: Win32 Unicode Debug , Wind32 Unicode Release
I set project1 d
-
- compiler option /Za
by Rakesh Simpi
- 1 Replies
- Last post
by einaros
- how do i declare arrays in native win32 dll without specifying the subscript and without changing compiler option('/Za')...
-
- Run-Time Check Failure #2
by JGMiller
- 5 Replies
- Last post
by Simple Samples
- I am receiving the error "Run-Time Check Failure #2 - stack around the variable..." when executing a program. The applications consists of multiple DLLs. I have a DLL instantiating a class that exists in another DLL. When the object goes out of scope I get the error. I have other DLLs where I instantiated the class exactly the same way and there is no error. The problem DLL was just adde
-
- Question about DLLs
by rKarthik
- 6 Replies
- Last post
by rKarthik
- Hi,
I am new to using DLLs and have been reading about them. I am somehow a bit confused about the concept of dllimport. While I understand that dllexport exports the functions in the DLL that can be invoked by an outside application, I am confused as to what exactly happens when you declare a function as __declspec(dllimport). Any help/explanation would be greatly appreciated.
Thank
-
- This code snippet makes no sense...
by Bapa
- 14 Replies
- Last post
by einaros
- I've come across some code syntax I've never seen. It compiled, but I don't know how, or what it even does!
I've been reading a book about DirectX, and in one of the examples, this little piece of code was present: D3DXMATRIX *D3DXMatrixIdentity(D3DXMATRIX *pout); "D3DXMATRIX" is a type, of course. And "D3DXMatrixIdentity" is a function, of course. Now I don't see how this
-
- need help on window messaging!
by The Saeed
- 3 Replies
- Last post
by The Saeed
- Hi All,
we wrote an application that Load Outlook View Control, This ActiveX supports just 4 event, Is it possible to hook some of windows messages, but how to hook outlook specific events Is it possible to hook user defined specific events At all Which events can be hooked Is there any other forum or group you know they're familiar with window messaging to ask a question Thanks a lot for your
-
- Is there any difference between Unicode char set and Multi-byte char set ?
by Lejing
- 4 Replies
- Last post
by Mike Danes
- Is there any difference between Unicode char set and Multi-byte char set in the Visual Studio 2005
Thank you!!
-
- Baffled by pointers, etc
by Odds On
- 4 Replies
- Last post
by Odds On
- I'm totally new to VC++.Net and am baffled by how to extract data from a previously existing file.
I'm trying to write a command line utility to read the first two bytes of the header of a file and then pass back information on what needs to be done with the file. However, Java is my first language and I'm totally stuck what to do.
Code so far is as follows:
void main( int a
-
- SendMessageA "access violation"
by jfranta
- 6 Replies
- Last post
by jfranta
- Hi, I'm trying to send a string from one dll to another application's window using SendMessage and WM_COPYDATA (as described here: http://www.codeproject.com/threads/ipc_wmcopy.asp ).
I get the window handle of my target window fine, but when I send the message I get an access violation reading from the pointer CD.lpData (points to the string I'm trying to send).
What's strange is th
-
- Linker Error (LNK2005) while upgrading a project from VS2003 to VS2005
by vikver
- 1 Replies
- Last post
by Bite Qiu - MSFT
- Hi,
There is a project which i'm trying to upgrade from VS2003 to VS2005. While building the project on VS2005, getting the following linking error:
18>msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std: perator<<<struct std::char_traits<char> >(class std::basic_ostream<
-
- why the shellhook doesn't work
by xiaoxiao608
- 3 Replies
- Last post
by Simple Samples
- why the following shellhook doesn't work when you create a new windows but if you delete the case HSHELL_WINDOWDESTROYED:and case HSHELL_WINDOWACTIVATED: it works very well!
LRESULT CALLBACK ShellHookProc(int nCode,WPARAM wParam,LPARAM lParam) { CString strName; CWnd* pwnd; switch (nCode) { case HSHELL_WINDOWDESTROYED: pwnd=CWnd::FromHandle((HWND)wParam); pwnd->GetWindowText(strName); S
-
- ofstream don't produce out put (C++)
by djpupeikis
- 14 Replies
- Last post
by djpupeikis
- Hi
I have a problem. I'll try to explain it.
When i used:
ofstream outFile;
outFile.open("file.txt", ios::app);
Every thing whas ok, but when I started to use user defined by GetOpenFileName dialog box it dont producing any error and no produce out put to what file.
ofstream outFile;
outFile.open(failas, ios::app);
Global value:
TCHAR failas[MAX_PATH];
Is de
-
- is it safe to use "free(*)" on a object allocated with "new" ????
by NeederOfVBHelp
- 6 Replies
- Last post
by Bruno van Dooren
- The title basically states it all. Here is an example: void* pointer; void method() {
MyObject* myObj = new MyObject(); pointer = (void*)myObj; free(pointer); } //would that type of code be safe
-
- QueryInterface return E_NOINTERFACE when executing in native code and called through managed wrapper
by GeminiSaka
- 14 Replies
- Last post
by Mike Danes
- (Environment: WinXP, Visual Studio 2005)
The structure of my sample program is listed as follows:
1. Create a native COM component Fun, with interface IFun;(ATL project)
2. Create a native c++ class using this COM component(Win32 application and build to a dll file)
class CSample{
private:
IFun* m_pFun;
public:
void Initialize(){
... IUnknown* pUnk;
-
- How to capture a termination signal?
by BrianHks
- 5 Replies
- Last post
by Simple Samples
- I apologize if this is not the right forum. It seems the most appropriate. I have a win32 app that runs in the background. I want to detect when it is requested to close. On *nix platforms I can do this by capturing the termination signal. But I have noticed in the documentation that windows only supports a few signals and termination is not one of them. So how do I detect if the program is closin
-
- VC++ 2005 redistributable
by Jay K
- 14 Replies
- Last post
by Nelson B
- Hi, I'm trying to get an MFC application compiled with VC++ 2005 to run on a machine with VC++ 2005 express. There seems to be a problem with the manifest (which I don't fully understand despite reading the info on msdn). The original error in the event log when I tried to run it said Microsoft.VC80.CRT not installed so I installed the platform SDK and also copied over the atlmfc directory from th
-
- Use of const instead of #define
by RedKMan
- 8 Replies
- Last post
by Simple Samples
- I've read that it is better to declare a variable as a const instead of using the old C method of #define. Usually I'd just put the #define MAXHWND 8 code under the Includes in the header file. I realise debugging wise and for clarity of code its better to use const but do some c++ guys still stick in a #define because they are so simple to use
Or should I just shove a const INT MAXHWND =
-
- adding a variable of an ActiveX control
by Gloria123
- 2 Replies
- Last post
by Kanchari Srikanth
- To all,
There is a third party ActiveX control called Alphanumeric that I add to the Tool box and put on a dialog box. When I try to add a variable, I get a message box with the heading, Internet Explorer Script Error.
The Extender Provider failed to return an extender for this object.
Can anybody help me with this error
Thanks,
Gloria
-
- OCX registration problem - help me
by Jefy
- 1 Replies
- Last post
by einaros
- i have developed an OCX in VC++ of Visual studio 2005. My operating system is windows 2003. But my problem is I canot able to register this OCX in windows 2000 machines.
I have checked this OCX using depends watcher in windows 2000 machine. I have noticed one problem is there is version conflict in WS2_32.dll. Some functions not in this WS2_32 dll.
How to correct this OCX registration proble
-
- Question About C++
by Random-1324
- 7 Replies
- Last post
by Simple Samples
- Hey, I have a question about C++. When I make a code and I compile it, how do I get the .exe Like the program of it and not the code. Also, if I give the program to someone else, do they need anything for the program to run, and can they view the code Thanks in advance for anyone who helps me out!
-
- Problem in handling the WM_NCPAINT
by Naveen R
- 2 Replies
- Last post
by Naveen R
- Hi, I have some problem in handing the WM_NCPAINT. As per MSDN, the dc with the region clipped can be obtained as follows for handling the WM_NCPAINT. case WM_NCPAINT: { HDC hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW|DCX_INTERSECTRGN); } But when I tried this am getting hdc as NULL. Any solution for this issue. N.B - I tried using the DCX_CACHE flag in the GetDCEx() function. Eventhough in th
-
- Basic DLL Creation and Deployment in Visual C++ 2005
by Sebastian381
- 13 Replies
- Last post
by Sebastian381
- Hello: I'm having trouble understanding how to create and use C++ DLLs in Visual Studio 2005. I'm used at creating DLLs in C#, but as that code is run on a VM, the process is a lot simpler. I know this is probably a newbie question, but I haven't been able to find a complete resource on the topic. The problem is the following: I have one project, which used to compile to a .lib file, and now I wan