|
srija wrote: am using a "for loop"...
Have you seen here?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
hi,
i Create a application in ATL COM application,( for dll based application)
with simple get and set method for adding 2 nos
which is very similar to the link
http://www.codersource.net/atl_tutorial_events_properties.html[^]
but after build the appliaction i get error as
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1827) : error C2259: 'CComObject<class csimpleobj="">' : cannot instantiate abstract class due to following members:
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator<class atl::ccomobject<class="" csimpleobj=""> >::CreateInstance(void *,const struct _GUID &,
void ** )'
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1827) : warning C4259: 'long __stdcall ISimpleObj::total(void)' : pure virtual function was not defined
E:\templqw12\SimpleAtlCom\SimpleAtlCom.h(106) : see declaration of 'total'
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator<class atl::ccomobject<class="" csimpleobj=""> >::CreateInstance(void *,const struct _GUID &,
void ** )'
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1827) : error C2259: 'CComObject<class csimpleobj="">' : cannot instantiate abstract class due to following members:
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator<class atl::ccomobject<class="" csimpleobj=""> >::CreateInstance(void *,const struct _GUID &,
void ** )'
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1827) : warning C4259: 'long __stdcall ISimpleObj::total(void)' : pure virtual function was not defined
E:\templqw12\SimpleAtlCom\SimpleAtlCom.h(106) : see declaration of 'total'
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator<class atl::ccomobject<class="" csimpleobj=""> >::CreateInstance(void *,const struct _GUID &,
void ** )'
SimpleObj.cpp
reply me
send reply
|
|
|
|
|
Dear All
Can anyone help me to run a process before winlogon?
I have already tried to get the handle of winlogon with FindWindowEx but failed.
Please Help me.
Mohiul
My name is Mohiul,Nick name Rony
|
|
|
|
|
I think that you need to write a device driver in order to get something that you know will start before other system processes (you need a disk driver loaded in order to load winlogon from disk).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
A service might be what you are looking for. It depends on what problem you want to solve.
More information about services and how to write a service you will find here[^].
Hope this helps
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
Thanx for Replies.
I already running my application as a service.
But It activated after the windows logon.
My Aplication is a Scanner based application which will do something in
logon screen.
So please help me how I get the handle of winlogon???
Mohiul Rony
Programming is better than a lover...
-- modified at 23:05 Thursday 23rd February, 2006
|
|
|
|
|
mohiul wrote: Can anyone help me to run a process before winlogon?
You can create a service (they run without the need of anyone logging in).
You can also create an regular application and add it to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Items in this key run in the context of the machine and not any particular user.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
Hi,
I am running a unicode web application where data passed is in the form of MBCS. Now i am receiving 'Buffer Overrun Detected' error while connecting to CDatabase::OpenEX(). I have an application developed in VC++ (MFC).
BTW, connection string passed is in non-unicode format hence there should not be a problem in connecting to database.
One more point to notice is, I am getting this error in DEBUG mode and not in RELEASE mode.
Can anybody tell what is possibly the cause of the error?
Light thrown in this regard by anybody would be a great help to me.
Thanks for your time.
Nishith
|
|
|
|
|
meet2nishith wrote: Now i am receiving 'Buffer Overrun Detected' error while connecting to CDatabase::OpenEX().
What does this statement look like?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
Following string is passed as connection string which it successfully passes with CDatabase::Connect().
"ODBC;DSN=Corporate Directory;UID= corpdiruser;PWD= corpdiruser;APP=Internet Information Services;WSID=NISHITH;DATABASE=HRMSDB;Network=DBMSSOCN"
But when it comes back to same function, just after return TRUE; it fails and throws buffer overrun error. (_SECERR_BUFFER_OVERRUN)
|
|
|
|
|
Well Guys, ive got a query that why does crystal report control initialization is very slow. im facing this problem since ive installed crystal reports versions 10 n 11. it had better speed than 11 when i was using 9 version. if anyone knows the solution, please send me email at prog_irfan@yahoo.com
will b glad n thankful.
Irfan Shahid
Irfan Shahid
|
|
|
|
|
Hi,
I am new to vc++.
can anybody tell me what exactly applications we can write which are not able to write in any other language, i mean what is the exact purpose of vc++.I heard that it is useful for embedded applications. can anyone tell me other applications.
i will be thankful if u can suggest best sites which explain major advantages of vc++ otherthan any other language.
waiting 4 earliest reply
|
|
|
|
|
Apart from the application and web we can everything in vc++. applications developments area also possible in vc++ but constraint application development is not easy like vb or other applciation development tools.
Have A Nice Day!
Murali.M
|
|
|
|
|
thanx Mr.Murali for you information,
can u tell me is there any application kind of thing that we can only do with vc++ not with any other language.
|
|
|
|
|
we cann't say any application only possible in vc++. but the problem we decided to go any specilisation on your application for that we need to depend on third party controls. this is the restriction. but 80% we can solve with out any dependent. that is the beauty
Have A Nice Day!
Murali.M
|
|
|
|
|
Technically, there is no such thing. Since you can do anything in ASM you know...
However, C++ (don't mess it with VC++ as that is just one complier out there, although my favorite) is so powerful you can rely on it as providing a good balance (maybe, the best balance ever) between what you can do (nearly anything) and what effort it takes (a lot, I admit).
Besides, C++ programmers are paid well. Only Java gurus get more, I think.
So go grab a copy of Visual Studio and start learning C++.
|
|
|
|
|
trinadh_t wrote: can anybody tell me what exactly applications we can write which are not able to write in any other language
This question is upsite down and should instead be:
"Why do we need any other language (Java springs to mind) when we can do anything in C++?"
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
-- modified at 4:14 Friday 24th February, 2006
|
|
|
|
|
I am using win32 APIs for this project. I have to write records into a file and for that i was using FILE * fp; fwrite() and fread(). the Structure i am writing into file contains char fn[100];char sn[1000];char dt[20];char tm[20]; int ET;. Now for few reasons i had to change the sturcture and change the "dt" and "tm" fields to two different structures.each having three Integer variables.Now When i am trying to write records into the file it is working fine but when i am trying read from the file it just dies at the new "tm" sturcture's first int variable. While debugging i found that the other two variables contain some illegal values. the statement while(fread(&data,sizeof(data),1,fp)==1) breaks and goes to the next line of loop which is fclose(fp); before changing to new structure it was working fine(both read and write).
Why is it so? and is fread and fwrite are not safe ways to write records into a file ? if so, then, is there any better solutions for this? can anybody suggest the best Riskfree and Errorfree way to write and read from a file? cause i have to read and write to this file 10 times a minute(approx).
Thanks in advance
kss
|
|
|
|
|
I think that code snippets for the dec. of the structure, the writing of records, and the reading of records. Packing/alignment and how you "changed" members of the structure to other structures may be part of the problem.
Oh, and ReadFile(...) and WriteFile(...) are the Win32 APIs for reading and writing files. fread(...) and fwrite(...) are C-RTL functions.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
thanks james, But can i write records into a file using ReadFile() and WriteFile() and also i have another question please clear the doubt. if i am reading the file from a secondary thread and at that moment the primary thread tries to update it then, will it generate any error letting my second thread crash ? i cant let this happen as the secondry thread runs in the background. how can i achive the synchronization using WIN32 code....
kss
|
|
|
|
|
No, I do not think you will have any errors unless you manually handle locking sections of the file. You should synchronize access to the file HANDLE by wrapping calls to your read/write functions inside of a critical section (if the threads are in the same process) or a named object (event, mutex, etc.) if they are in separate processes.
Look up the Sync objects and their related functions (SetEvent , WaitForSingleObject , EnterCriticalSection , etc.) in the MSDN help
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
fwrite and fread are OK.
BTW, why not use a database instead of managing records manually?
|
|
|
|
|
no I cannot because i am writing a plugin kind of thing. so i can't use any database.my plugin has to read this file every 6 seconds to check for any new updates hey BTW will it create a problem while i am reading from the file and another therad updates this particular file. will the reading thread crash ?..
kss
|
|
|
|
|
fearless stallion wrote: BTW will it create a problem while i am reading from the file and another therad updates this particular file. will the reading thread crash ?..
No, but the data you'll read will be corrupt. Of course, if you manage sharing properly the reading thread will fail to open the file instead.
|
|
|
|
|