Hi i am checking the GUID of SqlClass which is in my Test.dll But it does not give success it failed with value... Whatis wrong in this code.
#include <windows.h>
#include <iostream>
using namespace std;
int main() {
HKEY hk;
long n = RegOpenKeyEx(HKEY_CLASSES_ROOT,TEXT("\\CLSID\\SqlClass"),
0,KEY_QUERY_VALUE, &...
VC++ 6.0, MFC application
In CEditBox (IDC_EDIT1) I have created a CString variable (m_strEdit1). How do I validate that the input is a number, including sign (+ and -)?
eg: (+10, -56)
It should not accept alphanumeric characters. How can I do this?
...
Hello!
Let's say I have 3 logged on users. I have a test application which I use to enumerate the WTS sessions on the local computer, using WTSEnumerateSessions. After that, I display the information contained in each of the returned WTS_SESSION_INFO structure.
On Windows XP, there are 3 structures displayed: Session 0, 1, and 3 (for e...
I'm trying to get an openfile dialog to show up on windows CE 6.0 according to msdn it's the same process as in win32, but it doesn't work. I submit for review the interresting part of the code :
#include <windows.h>
#include <commctrl.h>
#include <winuser.h>
#include <stdio.h>
#include <Commdlg.h>
/* Prototypes */
LRESULT CALLBACK ...
CSMTPConnection is an ATL (VC++) class in atlsmtpconnection.h.
Code:
static _TCHAR mailserver[ 256 ];
static _TCHAR mailsender[ 256 ];
static _TCHAR mailrecips[ 256 ];
static _TCHAR subject[ 256 ];
static _TCHAR msg[ 256 ];
static DWORD mailtimeout=10000;
static CSMTPConnection con;
...
if (con.Connect( mailserver, mailtimeout )){
if ...
I have an ATL/COM project, in VC++ 6. I want an existing class, that has never before been defined to raise events, to raise events. To do this, the class will have to implement a "connection point".
These events are of a type that no class has ever raised before, so I will have to create a new connection point, rather than reuse an...
It's kind of confusing when it comes to Microsoft Visual C++.
How to tell whether a Microsoft Visual C++ project is a .Net project, or a native C++ project?
...
I have created a COM componenet named as Test.dll in that i have created an interface IDiscover.
Now i came to 2 ways of allocating the memory as
IDiscoverPtr id(__uuid(TestClass)); and Test::IDiscover *id=NULL;
What is the differnce between these two....Any Information is appreciated..
Thanks in Advance
...
Hi what's wrong with my code I am trying to register the class in registry in the following way but while I am debugging it shows that class is not registered and application crashes.
What is wrong in this code please Help me.
Test::IDiscover *pICalc = NULL;
HRESULT hRes=CoCreateInstance(Test::CLSID_SqlClass, NULL,
CLSCTX_INPROC_SER...
In Vc++ 6.0 Dialog Based MFC application:
I do not want my user close the window by pressing the button [X] in the top-right side of the window itself and also (Alt+F4). I want to display a messageBox ("Do you really want to close the application"); if the user clicks the OK button then the application has to close, else if user clicks t...
Hi
Can any body tell me what is diff between regsvr32 and RegAsm and My Dll is C# dll so how can i import the classes to c++.
...
I am trying to figure out what the browse information (.sbr files) is used for but find only references how to create it. So what is it for?
Thanks
Dima
...
I'm starting to develop a Windows service. I want to use some classes from my own, that has little dependencies to some MFC classes like CString, CSocket, CArchive, CMemFile and CObject. MSDN says you need to be very careful about which pieces of MFC you use in the Windows service, but don't specifies it and don't describes the problems ...
*****BLOCK_1****
if( strcmpi(appName.c_str(),MSSQL)==0 ||strcmpi(appName.c_str(),MSSQL2005)==0 )
{
if (FAILED(CoCreateInstance (CLSID_SQLDMOServer, NULL, CLSCTX_INPROC_SERVER,
IID_ISQLDMOServer, (LPVOID*)&m_pSQLServer))) {
DMOAvailable=false;
IDiscoverPtr pICalc;
HRESULT hRes=CoCreateInstance(Test::CLSID_SqlClass, NU...
Hello everybody, my first question here:
I am having trouble using libcURL in a c++ project. I don't even get it linked. I am using Windows XP and Visual C++ 2008 Express Edition.
So here is what I did:
Downloaded libcURL: curl-7.19.5-devel-mingw32.zip
Opened new commandline project in VC++
Include folders 'lib' and 'include' to my n...
Is there a way in a Visual C++ Win32 DLL project to have the linker output the DLL to one directory and the import library (*.lib) to another?
...
I have a video capture card with SDK for Visual C++. Color frames (640 x 480) become available to me at 30 fps in a callback from the SDK. Currently, I am writing the entire image sequence out one at a time as individual bmp files in a separate thread -- that's 108,000 files in an hour, or about 100 GB per hour, which is not manageabl...
I'm learning C++, and I want to know from those who are very good developers now: What is the best IDE, Visual C++ 2008 Express or Eclipse Ganymede with CDT? Remember that I'm using Microsoft Windows Vista Ultimate. Thanks!
The book that I'm reading is from Deitel: C++ How to Program, 5/e, because I don't know if the code of the book su...
In my IE extension I am trying to get the screen co-ordinates of an element in C++/MSHTML. From my IHTMLDocument2, I do the following:
IHTMLDocument2:: pDoc->get_all(&pElemColl);
IHTMLElementCollection::pElemColl->item(varID, varIdx, &pElemDisp);
where
_variant_t varID = ("myID", VT_BSTR);
//myID is the tag name of the element I'm...
I'm learning C++ and when I was testing the Microsoft Visual C++ 2008 Express and Eclipse Ganymede, but with the g++ compiler as default, I've noted that a same code in VC++ get some errors and in g++ compile normally, without errors or warnings and execute normally, but I want to know what is the difference between VC++ syntax and g++ s...