|
Hey guys,
How can I enable my class, which is derived from CCmdTarget, to use message maps and message queues.
|
|
|
|
|
I have to make an application which will run on Servers like win 2k3 and Win 2k8. This application will run in system account with multiple instances each for one user logged on the machine. This application is designed to trap logoff event and stop logoff ..do some job and then progress ahead with logff.I am trapping WM_QUERYENDSESSION for this purpose, but unfortunately I donot get any information about which user has loggedd off. I am stuck here as all my applications running trap this message but I need to match them with the user name who actually wants to logg of depending upon that I will have to log off that particular user using his session ID.Please help me out in this.
Regards,
Kushagra
I hate coding but I luv to develop 
|
|
|
|
|
How about creating a Winlogon notification package? There's also the ISensLogon and ISensLogon2 interfaces, but those also notify after the fact.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have already created winlogon package which allows me to see which user has logged on as I get the token of explorer in this case. Where as If I try to capture the log off event It is caught when the log off is in progress so I cannot do any thing at that time to abort logoff also by the time the dll gets a call for Logoff the explorer dies and thus I am not able to get which user has logged off. I need to find out which user has logged off.
Regards,
Kushagra
I hate coding but I luv to develop 
|
|
|
|
|
Hi Friends Iam Very new to STL i want to know what Data Structures are used in MAP<char *,char="" *=""> internally to search or to insert or to delete. can any body let me know this is assignment assigned by my teacher......
Thanks in Advance....
|
|
|
|
|
You can download the stl source code from [^]
Since, this is your assignment, you should solve it.
HINT : check map.h and other files included in it.
|
|
|
|
|
It can vary from implementation to implementation but I believe that most use a balanced binary tree.
|
|
|
|
|
It all depends on the implementation. And anyway, if this is YOUR assignment, assigned by YOUR teacher, then YOU should be doing the work of finding out the answer, not asking someone else to do it - look at the source code.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The STL standard doesn't specify how a std::map is coded but rather its interface, which includes the complexity[^] of various operations. However, the complexity constraints and interface limit the choices. Generally a Red-black tree[^] is used.
Steve
|
|
|
|
|
I am currently developing application that plays videos for people in a simulator. The video player was developed by an old employee who has since moved on. The old developer used the elecard librarys/SDK to create the video player. The player works pretty good.
However, When I close the player and attempt to load another video the desktop is displayed for a short period of time. I tried to create a splash screen to hide the desktop using (CSplash - A Splash Window Class) project found on here. However, the splash screen stops working after new video player is loaded with file and ready to play in full screen. The splash screen window still exist in task manager but the screen is not visible and task manager says it;s not responding.
I tried to use tweakUI General, Focus, Prevent applications from stealing focus option. However that did not work Is there way to ensure, the splash screen is always on top?
Any help here would be great.
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
>> However, When I close the player and attempt to load another video the desktop is displayed for a short period of time.
why?????
> I tried to create a splash screen to hide the desktop using (CSplash - A Splash Window Class) project found on here. However, the splash screen stops working after new video player is loaded with file and ready to play in full screen. The splash screen window still exist in task manager but the screen is not visible and task manager says it;s not responding.
Your splash window is on same thread or a different one? may be your window is there but is not refreshed as your application thread is busy doing some other task.
Also, the idea of hiding desktop sounds like a quick, nasty fix. I hope it's not the case..
|
|
|
|
|
The placed the splash screen it's own application and it still failed after the video open full screen. I think the problem lies somewhere in video process feed of windows.
Scott
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
Hi. Well. I have a little problem, but i don't understand a thing. I'am trying to use some list in my class TLevel, but it always results in error (violation of memory). It's really simple.
I create my struct:
struct MyList
{
int numb;
MyList *Next;
MyList *Prev;
};
And include it in my class:
class TLevel
{
public:
bool LoadList(CString str);
MyList *Fieldlist;
bla-bla-bla
};
But as soon as i get into LoadList...
bool TLevel::LoadList(CString str)
{
MyList *HeadList;
HeadList = new MyList;
HeadList->Next=NULL;
HeadList->Prev=NULL;
this->Fieldlist=HeadList;
bla-bla-bla
}
|
|
|
|
|
I suppose you have a bla-bla-bla problem.
i.e. the posted code looks correct.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: I suppose you have a bla-bla-bla problem.

|
|
|
|
|
Cool. At least i know that i'am not crazy. Well. Here goes the rest of class TLevel.
class TLevel
{
public:
TLevel();
void CallBut(int xcoor,int ycoor,UINT nButton);
TLevel(int lvlsize, int sealvl);
~TLevel();
bool Generate(CWnd *dialog,int StartPointX = 0, int StartPointY = 0, int size = 50);
bool LoadList(CString str);
protected:
MyList* Fieldlist;
FieldStruct **map;
int LvlSize;
int SeaLvl;
int FieldSize;
int GetIndexX(int xcoor);
int GetIndexY(int ycoor);
};
I don't understand what can influence smthng so simple like Pointer1=Pointer2. It dosen't show any error. But as soon as i execute the code and it comes to this->Fieldlist=HeadList it raise a memory error (access violation). I'am desperate...
Oh yeah. And in constructor when i do smthng with Fieldlist it's ok. But when i get to LoadList function it crashes. Any idea?!
|
|
|
|
|
Nikz2 wrote: this->Fieldlist=HeadList; // an error appears. WHY HE CAN'T COPY A POINTER?!?!?!?!?!?
I just put your code into Visual C++ Express and it runs fine. There must be something else that you are not showing that causes the problem.
|
|
|
|
|
Well. I am sure that there has to be a thing, but i really don't even understand what could it be.. Any clue?
|
|
|
|
|
I found it!!! Cool. It was really simple.
TLevel *lvl = new TLevel(4,1);
CString str("C:\\FieldList.txt");
theApp.lvl->LoadList(str);
theApp.CreateLvl(lvl, this, 30, 30, theApp.FieldSize);
i make theApp.lvl inside of CreateLvl and at rate of LoadList it hadn't iniciated.
Thanks to all. It helped me a lot to understand that i am not crazy. Because i was really desperate =) thanks....
|
|
|
|
|
Is there some reason you're not using a standard container class - writing your own list makes absolutely no sense unless you're writing it to learn about things or because it's an assignment.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Well.. You see. It's just i tryed to use standart class and it resulted the same. I was thinking i use it wrong and for delete any doubt i wrote my own. It took me 10 minutes. And the problem and seeking for right code and examples took me hours. So sometimes it's more easy to use your own classes =)
|
|
|
|
|
Hi All Vc++ Programmers,
I have a strange issue with me.I have migrated one Application from vs-2003 to vs-2008 on Vista machine.When i enter a correct password it is getting logged in,but when i enter a wrong password the application gets crashed...I dont know how it is happening,,,,?
Why genarally exe crashes and if anybody having some idea please help me... I think it is a dll problem due to migration..?
modified on Friday, October 2, 2009 8:59 AM
|
|
|
|
|
When you log into Vista, your application crashes? If so, please explain the connection.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Was the application build with vs2003 ever ran on Vista ? or did you upgrade both OS and compiler at the same time ?
Is it possible your application is trying to access registry values without proper permissions ?
...
This signature was proudly tested on animals.
|
|
|
|
|
Dear Experts,
i could not able to build a following visual c++ code.can any one help me?
It shows can not open activeds.h
#define _UNICODE
#pragma comment( lib, "Activeds.lib" )
#pragma comment( lib, "Adsiid.lib" )
#include "stdafx.h"
#include <atlbase.h>
#include <activeds.h>
#include <cstringt.h>
#include <atlstr.h>
#include <comdef.h>
#include <Iads.h>
#include <Adshlp.h>
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr;
IADsContainer *pCont = NULL;
CoInitialize(NULL);
hr = ADsGetObject(L"WinNT://xxx.com/dc1.yyy.xxx.com", IID_IADsContainer, (void**) &pCont );
if ( !SUCCEEDED(hr) ) { return hr;}
_variant_t var;
IEnumVARIANTPtr pEnum;
ADsBuildEnumerator (pCont,&pEnum);
int cnt=0;
ULONG ulFetched = 0L;
_variant_t vChild;
while((SUCCEEDED(ADsEnumerateNext(pEnum, 1, &vChild, &ulFetched)) && ulFetched==1))
{
IADsUser* pADs;
hr = V_DISPATCH(&vChild)->QueryInterface(IID_IADsUser, (void**)&pADs);
if(hr!=S_OK)
break;
BSTR bstrName;
pADs->get_Name(&bstrName);
CString csName=bstrName;
SysFreeString(bstrName);
printf("%s\n",csName);
pADs->Release();
pADs = NULL;
}
// Cleanup.
if ( pCont )
{
pCont->Release();
}
CoUninitialize();
}
return 0;
}
|
|
|
|