visual-c++

Modify,block HTTP connection

Hi, i would like to write proxy in vc++, which blocks some http requests. Can you please advice me, how to intercept and examinate these requests. What do i need to do this? ...

GetSaveFileName() not returning path of CD burning staging area on XP

I have a feature where I save a file to a location that user specifies. I'm using GetSaveFileName() to show the Save As dialog. I then use the path that it returns to write out the file to that location. I've noticed that it does not work when the user chooses the CD-RW drive on an XP machine. This same process works correctly on Vista a...

Example showing how to add a button/menu to the glass part of a Vista window frame like Opera/Firefox 4

I'd like to add a menu to the glass part of the frame in a C++ application which is using WTL and Win32++. Those libraries are probably largely as this is something I'd need to do from Win32. The latest versions of Opera and the upcoming Firefox are going to be doing this but I haven't been able to find a code example. Has anyone got e...

What features of C++ are not compatible with compilers other than Visual Studio?

I was told to avoid using features of C++ like these as it makes it difficult to port the code to other compilers. The example I was given was using #ifdef instead of #pragma once in my header files. ...

How to detect SSL handshake with LSP?

Hi, how can i detect that application wants to establish ssl connection using LSP. I need to break that SSL handshake and detect the destination adress and port. Is that possible? I am using vc++. ...

Is it safe if a virtual function refers to variable in a derived class in C++?

When derived is cast back into base. By safe, I mean it works properly for known c++ compiler. It seems to be working for VIsual C++ 2008. E.g class zero { virtual int v()=0; } class a: public zero { public: int value; a(int vin) { value =vin; } int v() { return value; } } zero *e1= new a(3); cout <<...

Linker issue calling the D3DX10CreateEffectFromFile() method

Having issues trying to retrieve a effect file for directX. If I do not include the D3DX10CreateEffectFromFile() method, the application compiles correctly. If I do include it. I get the following error 1>GXDX.obj : error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW@48 referenced in function "public: virtual void __...

Compiling apache modules for Windows and Linux distros

Hello everyone. I have written an Apache2 module in C, now I am at the point of distributing the module. I am not sure of the standard practices regarding the distribution of Apache modules, so I am considering to provide binaries for some of the more common platforms, like Windows and Ubuntu, etc. I have two questions to ask- Will ...

How to get MRU List data?

Hi, how can i get data prgogrammaticaly from windows registry MRU list? I am using vc++. For example windows xp search history is located in Software\Microsoft\Search Assistant\ACMru\5603. How can i get data from it? EDIT:I still dont know howto do this, can you be more specific? So what steps do i need to do to have acess to data? ...

Can I code for Visual C++ and Visual Basic on Ubuntu?

I want to change my OS to Ubuntu, but I have pending projects in Visual C++ and Visual Basic. I have not worked with Ubuntu before, so will I be able to carry forward my pending work to Ubuntu? Will it work with the IDEs available in Ubuntu? ...

Returning char* / Visual Studio debugger weirdness

We're getting some funny behavior in the Visual Studio debugger with the following. I'm not sure if it's the code or some debugger weirdness (seen stuff like it before). We are trying to return a pointer to an value in an array. The weird behavior is that the value of x changes to equal y after func() is called a second time...at least,...

Questions about "this pointer adjustor" in C++ object layout.

I am kind of confused by one question: Under what cirumstances does the MS VC++ compiler generate a this adjustor? Notice that the this adjustor is not necessarily in a thunk. Below is my test code. class myIUnknown { public: virtual void IUnknown_method1(void)=0; virtual void IUnknown_method2(void)=0; int data_unknown_1; ...

Problem with Threads in MFC project

Mabye someone over here can explain to me what am i doing wrong...This is after reading a lot of articles over the net and doing what say said over there...and not working.... My problem is that i am developing a nice little game with a background music and explosion sound, for the explosion i know i need to use threads or my music stop...

How can I change the output executable file name in Visual C++ 2010?

Is there any way to change the output executable name (ProjectName.exe) to some custom name in Visual C++ 2010, without changing the project name? Thanks. ...

Discriminating between typedefs to same type in c++

I want functionality similar to the below: typedef int A; typedef int B; struct foo { foo(A a) { /*specific to type A*/ } foo(B b) { /*specific to type B*/ } }; I use the typedefs in my program to denote logically different usage of the same type. So, I would like to create object of type foo differently for different typedefs. ...

Embedding v8 with Visual C++ 2010

Hi I'm trying to embed the v8 engine to my C++ application. I use Visual C++ 2010. I've built it successfully using this command: scons env="INCLUDE:C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files\Microsoft Visual Studio 10.0\VC\include,LIB:C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib;C:\Program Files\Micros...

Ivor Horton's Beginning Visual C++ 2010

How good this book is for learning C++? Has someone read it? ...

Ways to update a sql server database from a VC++ win32 project?

Hello I'm in the process of creating a Password Filter as described here. I can manage to write the VC++ code. My issue is that i need to update SQL Server database from that code. I dont have any past experience in VC++ Win32 project. My assumptions are Linking an external dll (compiled C#.net code) which will take care of the databa...

Linking... LINK : fatal error LNK1181: cannot open input file 'libgsl.a'

Hi, I am using SIFT algorithm code by Rob Hess which uses OpenCV library, in Windows. And I am having visual studio 2008 as the IDE. When I run the program for image matching having Debug as the Solution Configuration in VS There is no problem, everything works fine. But when i change the Solution Configuration to Release it gives a lin...

C++ .net "Unable to load assembly XX.XX"

I'm developing C++.net 2.0 under Win7 with VS2008. I am working with several layers of UserControls. I have a DLL Names "MyControls.dll" that contains a control, derived from a control in "BaseControls.dll". Every time I attempt to load any controls in MyControls that derive from BaseControls, the designer breaks with the error: Cou...