|
As far as I know the IIS use the IWAM_[machinename] to launch out of process applications, and an anonymous access to IIS will run under IUSR_[machinename] account ( check the users lists from your machine). So if you impersonate your client from your component you will impersonate IWAM_XXX or IUSR_XXX, not the logged on user.
|
|
|
|
|
I checked the client SID before the call to CreateProcessAsUser using
getInfoFromToken( .. ) and then i used
pgetsid.exe (pgetsid DOMAIN\user) to get his SID : they matches. Does this mean
that I am impersonating the right user ? Does the parent executing the server need additional privileges ???
|
|
|
|
|
The security for your virtual directory where the ASP page is located is "integrated windows authentication" without "Allow anonymous access" ? And what about your component : is out of process or in process ?
For CreateProcessAsUser maybe you will find this link helpful : http://www.mvps.org/win32/security/lu_cpau.html
|
|
|
|
|
I have a problem when trying to listen to BREAK signals on serial comm port(UART). I want to start sending data on the comm port after windows have received three BREAK signals.
I am counting the jumps to the BREAK_signal function, I know when to start sending data by simply having a if ( break_detected == 3).
The problem is that when in debug mode, it is working fine, but when in release mode I get an "unhandled exception" message.
Please someone...should I maybe clear some register after one BREAK signal has been set off??? Or where could the solution be found??
|
|
|
|
|
Hi
It is possible to call COM+ application on remonte machine using smart poiners ?
If yes, how to call COM+ application from machine with COM+ application proxy installed ?
Thx 4 Hlp
|
|
|
|
|
In COM you don't care about the object location. When you create an object instance that object can be located anywhere ( in the same process, in another process, or remote ). Smart pointers are just a way to reduce your programming effort when you deal with COM development. So if you want to instantiate a remote component install the proxy on the client machine, create the object and use it.
|
|
|
|
|
hi
I compiled an idl file and a tlb is also made
though the tlb is registered in my system , it is not shown in the OLE COM Object Viewer
what should i do to make the tlb visible in it ?
|
|
|
|
|
Your TypeLib will appear in OLEView only if it is registered ( should be listed in registry under HKCR \ TypeLib). You can see it anyway with OLEView, select File / View TypeLib and browse for your dll, ocx, tlb & the rest.
|
|
|
|
|
hi,
all
I am a newer to learn com progrmming .Now who can tell
me how to generate the guid of interface in com.
Your advanced help will be appreciated.
Best regards.
|
|
|
|
|
GUID guid;
HRESULT hr;
hr = ::CoCreateGuid(&guid);
if(S_OK == hr)
{
//guid is generated
}
soptest
|
|
|
|
|
If you don't need to do it programatically, you can use the guidgen tool to generate one. Just run 'guidgen.exe' (located in your Visual Studio installation's Common\Tools\ folder) and it generates one in a number of formats for cut-and-paster as required.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hi all,
I have a problem in using tab to shift the focus from one control to another. Mine is an ATL dll with MSF support which has around 20 views in splitter window and each view will be shown when a particular selection is made in the left pane. My problem is that in all these views I am not able to change the focus from one control to another using the tab key though I have set the TabStop property foa al the controls.
Also I tried to handle the Tab key by overriding the PreTranslateMessage function. But the control is not at all going to the function on tab key operation.
Pls give me a soln if any one has.
Thanks in advance,
-manju
|
|
|
|
|
Hi ,
I also faced the same problem a year back in not for a ATL but in a Hidden ACtiveX which has a DialogBOX inside the ActiveX -
Problem is - The ActiveX or ATL Control doesnt has its own message queueso pretranslate message doesnt come to it at all - The control is with the parent window so all the WM_KEYDOWN messages routed to the parent window. I had a small work around - I had the pretranslate message of Parent Container window overridden and got the Window Handle of the Message source and then set the focus to the desired Target window. This is a very immature and primitive solution - then when i posted it in code guru i had this solution after 1 year though its effective - take a look into it and lemme know if u are able to solve the problem
Below is my post - so u can have the whole thread
---------------------------------------------------------------------------------------------------
Hi I have a peculiar problem ,i used the method of creating mainframes and dialogs inside a dll , but i created them inside a activeX control (invisible one) and below is the problem .
Thanx
Bush
Problem :
We have developed 2 activex conrols using the activex wizard from MSVC++ 6.0 SP3.
The architecture of the ocx is as below :
ActiveX A-
This is developed with DocView architecture in mind (Microsoft MIND magazine article 1996-97).But slightly modified for creating a complete mainframe application inside a invisible OCX control.Interfaces are written for creating and showing the application through the ole control.In design time we have placed the control inside a MFC dialog based application and generated a wrapper class for it and are able to create and show the Mainframe application inside the ocx.Problem comes when we there is a ALT+anykey combination on the application.The ole conrol
just hangs for ever,also it hangs the whole application.We were able to get to a point where we see exactly which message is fired and tried to handle the same by handling pretranslate message of the mainframe inside the control and doing a PeekMessage and PM_REMOVE from the message Q for a quick workaround.But it didnt work.The app still hangs.
ActiveX B -
This is similar to the ActiveX A but is a dialog application.
Functionally they are wokring absoulutely fine except for the ALT+ANYKEY combination where the application from the activeX just hangs.
PS:The dialog's or the mainframes PretranslateMesage is just not getting called.
---------------------------------------------------------------------------------------------------
This was posted by Aditya Roy on codeguru to my comment regarding the above problem . Please not this was for my activeX with a MFC Dialog in it - this should be the same case as urs - so check it out and see if this helps
---------------------------------------------------------------------------------------------------
The reason for it -
ActiveX's do not have its message queue, the host container's Queue is used. So all key messages are taken by the container as your dialog is probably non modal.
Solution -
1. Make a Static function called hpMsgProc
LRESULT CALLBACK hpTest::hpMsgProc(int nCode, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
LPMSG lpMsg = (LPMSG) lParam;
if( (nCode >= 0) && PM_REMOVE == wParam && (lpMsg->message >= WM_KEYFIRST && lpMsg->message <= WM_KEYLAST) && AfxGetApp()->PreTranslateMessage((LPMSG)lParam) )
{
lpMsg->message = WM_NULL;
lpMsg->lParam = 0L;
lpMsg->wParam = 0;
}
return ::CallNextHookEx(hook, nCode, wParam, lParam);
}
2. Make a member variable called hook of type HHOOK.
3. In InitDialog, add
hook = ::SetWindowsHookEx(WH_GETMESSAGE,hpMsgProc,AfxGetInstanceHandle(),GetCurrentThreadId());
In Onclose, free it.
::UnhookWindowsHookEx (hook);
this should work.
-Roy
---------------------------------------------------------------------------------------------------
Regards
Bhushan
|
|
|
|
|
I have written a COM server an an COM client. Both work well when used locally, but when I try to use them on two different machines it doesn't work.
The client is on Win98 and the server is on WinNT 4, I use DCOMCnfg.exe to configure access.
When I trace into the CreateDispatch of the client, it fails when calling OleRun(). A blue screen appears '... 0028:c02cfa16 in VXD VREDIR...', and in the debug window :
Warning: CreateDispatch returning scode = severity: SEVERITY_ERROR, facility: FACILITY_WIN32 ($800706BE).
First-chance exception in TestProxy.exe (RPCRT4.DLL): 0x800706BE: (no name).
First-chance exception in TestProxy.exe: 0xE06D7363: Microsoft C++ Exception.
D:\Projects\Softwings\TestProxy\TestProxyDlg.cpp(95): OLE Execption caught: SCODE = 800706beThe thread 0xFFF9DB85 has exited with code 13 (0xD).
Can someone help me
|
|
|
|
|
I have created one singleton COM server for Exe applications and service interaction. So, we should create one instance of COM server for the system. I
have tested with two or more Exe application(Clients). Its working fine. Right now, I have one service and Exe application as its client and they need to interact with same instance of COM Server. But, COM manager creates two instances. One for Exe application(user account), another one for Service(Default account).
I tried Interactive user Option as I wrote in my previous mails but that has some other limitations like not starting if no one is logged on the PC after restarting for quite sometime.
|
|
|
|
|
Y should register your COM server as NT service.
soptest
|
|
|
|
|
Hi all,
Again, the names COM, DCOM and COM+...? What's the difference between them as I see them used in similar contexts all the time.
/Tommy
|
|
|
|
|
DCOM is distributed COM,and it's for networking component.
COM+ is new technology that come after COM and available in W2K and later.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
As Mazdak has pointed out, DCOM is for distributed networking components and is COM components that are meant to be implemented across networks and as such there are quite a few issues like security etc.
COM+ is the next advancement to COM and is usually though that COM+MTS = COM+. Thus, generally, when an enterprise COM component additionally handles issues like transactions coupled with state management, it is a COM+ component.
#define MOSTLY_LEAN_AND_MEAN
|
|
|
|
|
Hi Amit:
I think you made a mistake,you have to reply to Tommy Svensson ,not me;)
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hi,
Everybody is talking about COM and how great it is... Does anyone know of a good book to read on this subject or a site on the net which deals wíth COM from super scratch? Preferably with VC++.
Thx a lot,
/Tommy
|
|
|
|
|
Essential COM by Don Box
Michael
|
|
|
|
|
Thx! Will have a look at it!
|
|
|
|
|
Hi, Tommy see my aswner to Nish about COM books
COM/ATL BOOKS
Cheers,
Joao Vaz
|
|
|
|
|
Joao Vaz wrote:
Hi, Tommy see my aswner to Nish about COM books
COM/ATL BOOKS
Thx a lot Joao,
/Tommy
|
|
|
|