|
If your running under the 'system' account you need to have "Allow service to interact with desktop" checked. This is in the Server Properties dialog that you must get to from the 'Services' control panel.
"No matter where you go, there your are..." - Buckaoo Banzi
<pete/>
|
|
|
|
|
Yes that is check'd but is there any restrictions on the size of the UI resources that can be put in a Service (that is causing me problems) ?
or
Is there any limit on the size of the service exe image loaded ?
Tnx palbano
<marquee>. . . Humans do it better . . .
|
|
|
|
|
Prabhakar wrote:
I have a Windows Service application with 4-5 dialog boxes in it. I have good reasons to believe that it should have them, but the service would not start unless I remove them.
Thumb rule: Services should not have windows or consoles that provide feedback to the user.
If the service must have a user interface, it must run under the LocalSystem account.
Any information from EventLog when you have those dialog boxes?
Follow live World Cup Cricket scores here[^]
|
|
|
|
|
Read this:
MSDN[^]
lpDesktop
Windows NT/2000/XP: Pointer to a null-terminated string that specifies either the name of the desktop, or the name of both the desktop and window station for this process. A backslash in the string indicates that the string includes both the desktop and window station names.
For CreateProcess and CreateProcessAsUser, if this member is NULL, the new process inherits the desktop and window station of its parent process. If this member is an empty string, the process does not inherit the desktop and window station of its parent process; instead, the system determines if a new desktop and window station need to be created. If the impersonated user already has a desktop, the system uses the existing desktop.
For CreateProcessWithLogonW, if this member is NULL or an empty string, the new process inherits the desktop and window station of its parent process. CreateProcessWithLogonW adds permission for the specified user account to the inherited window station and desktop. Otherwise, if this member specifies a desktop, it is the responsibility of the application to add permission for the specified user account to the specified window station and desktop.
Follow live World Cup Cricket scores here[^]
|
|
|
|
|
How do you include .NET references in C++ within VS .NET? I want to use the MailMessage object. In C# you just have to specify the following at the top of your file.
using System.Web.Mail
What is the C++ equivalent?
Thanks.
Ron Ward
|
|
|
|
|
Hie
I would like to know how to detect in realtime when another process write into a specific file. This time i try to use completion methode. A little bit like visual when we modify a opened source file by another application. Visual display a dialogBox with the question (Would you want to reload the file ?). But Visual use this juste with focus gain, and me i want to do it in real time.
I create a file sharing and use overlapped option
I try to read into the file and i use the getOverlappedResult function with bWait at TRUE to wait the reading.
I write with another process into this file
But my app still lock ever.
If somone know how to do it ?
thx
|
|
|
|
|
|
zebiloute wrote:
I would like to know how to detect in realtime when another process write into a specific file
The only way to do this is by developing your own "file system filter driver". Check Microsoft's site.
|
|
|
|
|
This one's weird. I'm trying to compile some code that uses a third-party SDK, and I was getting lots of strange compile errors - classes not found, #endif's not found, etc - until I changed the linefeeds in the header files from Unix-style to DOS-style. Now everything compiles.
This is not an adequate fix because we may use future versions of this SDK, and I don't want to have to force our engineers to tweak these files every time a new version of the SDK is instaled. Does anyone know a way around this?
Thanks
|
|
|
|
|
i had to write a program to fix this for some source i was using...
#include < stdio.h >
int main(int argc, char* argv[])
{
while (!feof(stdin))
{
fputc(getc(stdin), stdout);
}
return 0;
}
-c
WWT2D?
|
|
|
|
|
Hi All,
I have had success using the new Symbol Server with WinDbg to view system symbols while debugging. How can I setup VC6 to also use the correct system symbols automatically?
D.C.R.
|
|
|
|
|
I have a subclassed edit control on a propertypage, which is a page in a propertysheet. I want to get all keystrokes in that edit control's PreTranslateMessage including Tab, Ctrl+Tab, Esc, Enter etc - but, the propertysheet/page captures some of these and does other things. How can I suspend the propertysheet/page from doing this, when the focus is on the subclassed edit?
My article on a reference-counted smart pointer that supports polymorphic objects and raw pointers
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Your edit control should handle WM_GETDLGCODE and return DLGC_WANTALLKEYS
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
|
I have a Dialog application that has 4 grids(which are added as variables to the class ) and has a Com Server that this applications talks to .This is a multithreaded application where the Thread function populates the grids Now I add a new Flexgrid and the following happens :
Code runs Ok in the debug and Release configurations
When I go to class wizard and add a variable to this last grid like : m_grid5.
My code crashes in the release Configuration .
When i dont add a variable but access the grid using a Pointer by doing :
CMSFlexGrid *m_grid6=(CMSFlexGrid *)this->GetDlgItem(IDC_MSFLEXGRID_FILTER2);<br />
m_grid6->SetRows(1);
The code runs fine in the release mode .
I am not able to follow what internally is happenning or conflicting . Suggestions will be helpful .
Thanks
|
|
|
|
|
|
Hello.
I went here http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/hosting/wbcustomization.asp and took this example in the "Controlling Navigation" section of this article:
case DISPID_BEFORENAVIGATE2:
{
CComBSTR url = ((*pDispParams).rgvarg)[5].pvarVal->bstrVal;
if (url == "http://www.adatum.com" || url == "http://www.adatum.com/")
{
CComPtr<iwebbrowser2> spBrowser;
CComPtr<idispatch> spDisp = ((*pDispParams).rgvarg)[6].pdispVal;
spDisp->QueryInterface(IID_IWebBrowser2, (void**)&spBrowser);
spBrowser->Stop();
CComBSTR newURL = L"http://newdomain.com/newpage.htm";
spBrowser->Navigate(newURL, NULL, NULL, NULL, NULL);
((*pDispParams).rgvarg)[0].boolVal = TRUE;
}
break;
}
The question is:
If I click the link to "http://www.adatum.com" that opens in the same window then everything works fine and browser navigates "http://newdomain.com/newpage.htm". But in the case of holding shift or using in a href target=_blank or target="some_name" (i.e. opening link in new window) it navigates to "http://www.adatum.com".
Anybody knows what can be the problem?
I'm using IE 6.0 and Win2k
Thanks
|
|
|
|
|
To react on navigations when creating new browser windows you need to handle the NewWindow2 event (DISPID_NEWWINDOW2). There, you can intercept the creation of new windows and f.i. provide an IDispatch to your own browser, thus being able to handle DISPID_BEFORENAVIGATE2. There should be some examples about that on MSDN.
|
|
|
|
|
I'll try to explain what I see in the debugger.
This piece of code was used in a Browser Helper Object.
1 case DISPID_BEFORENAVIGATE2:
2 {
3 CComBSTR url = ((*pDispParams).rgvarg)[5].pvarVal->bstrVal;
4 if (url == "http://www.adatum.com" || url == "http://www.adatum.com/")
5 {
6 CComPtr<iwebbrowser2> spBrowser;
7 CComPtr<idispatch> spDisp = ((*pDispParams).rgvarg)[6].pdispVal;
8 spDisp->QueryInterface(IID_IWebBrowser2, (void**)&spBrowser);
9 spBrowser->Stop();
10 CComBSTR newURL = L"http://newdomain.com/newpage.htm";
11 spBrowser->Navigate(newURL, NULL, NULL, NULL, NULL);
12 ((*pDispParams).rgvarg)[0].boolVal = TRUE;
13 }
14 break;
15 }
I'll explain what I have while debugging:
variant 1 (opening link in the same window)
DISPID_BEFORENAVIGATE fires
string 12 works fine setting pDispParams->rgvarg[0] to True
browser Navigates to http://newdomain.com/newpage.htm
variant 2 (opening link in new window):
DISPID_NEWWINDOW2 fires
I use such string to cancel Navigation:
((*pDispParams).rgvarg)[0].boolVal = TRUE;
In debugger the value of pDispParams->rgvarg[0] becomes True but nothing happens...
DISPID_BEFORENAVIGATE fires
everything works like in variant 1 except that
string 12 doesn't work setting pDispParams->rgvarg[0] to {???}
browser Navigates to http://www.adatum.com
|
|
|
|
|
I found the problem but don't know how to solve it
The code I gave was not the same I used. I tried to add a header to Navigate2
Who could imagine that additional headers are the reason of the problem?
When the code is like this everything works fine (with additional header) only when link opens in
the same window:
---------------------------------------------------------------------
CComVariant vtEmpty;
VARIANT vtHeaders;
vtHeaders.vt = VT_BSTR;
vtHeaders.bstrVal = SysAllocString(L"addHeader:newHeader");
VARIANT vURL;
vURL.vt = VT_BSTR;
vURL.bstrVal = SysAllocString(L"http://newurl/newpage.htm");
spBrowser->Navigate2(&vURL,&vtEmpty,&vtEmpty,&vtEmpty,&vtHeaders);
---------------------------------------------------------------------
When the code is like this everything works fine (without additional header) both when link opens
in the same window and in a new window:
---------------------------------------------------------------------
CComVariant vtEmpty;
VARIANT vURL;
vURL.vt = VT_BSTR;
vURL.bstrVal = SysAllocString(L"http://newurl/newpage.htm");
spBrowser->Navigate2(&vURL,&vtEmpty,&vtEmpty,&vtEmpty,&vtEmpty);
---------------------------------------------------------------------
So the reason seems to be in headers. But I need to send additional header even if link opens in a
new window.
So the problem remains.
|
|
|
|
|
Under MyKey, on the right panel of the registry, the entries look like:
name data
-----------------------------
Folder c:\myDir
If RegSetValueEx fails, will I see
name data
-----------------------------
Folder no data here
or
name data
-----------------------------
no entry at all
I am not totally sure from MSDN, because I guess I cant decide what the "value" is ----- name or data...
Appreciate your help,
ns
|
|
|
|
|
Sometimes it would be nice to print my source code without comments. When I am in the development stage and am trying to figure out how to code something somewhat complex, I sometimes need to print out where I am, in order to fix it or complete it. e.g. a couple of nested while loops with plenty of comments in between.
Sure would be nice if there was a utility or macro I could run that would strip all comments from my source so I can print it out on a page or two versus what sometimes is a lot longer with comments in it. Currently, I cut and paste a section that I am working on into an editor and then manually remove all comment lines and sometimes some unnecessary code (for display only) such as error handling/checking routines to limit the amount of actual code I want to see.
Anyone know of such a tool?
|
|
|
|
|
Hi
Is it not allowed to start a thread in CDialog?Why isnt the below code working?(where IDC_GRAPH_FRAME is a picture control of Frame type)Please enlighten.
Thanks.
UINT PlotAttenuationThread(LPVOID pParam)<br />
{<br />
CWnd* gFrame = (CWnd*)GetDlgItem(IDC_GRAPH_FRAME);<br />
CDC* pDC = gFrame->GetDC();<br />
ReleaseDC(pDC);<br />
return 0;<br />
}<br />
<br />
<br />
BOOL CGrapDlg::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
<br />
AfxBeginThread(PlotAttenuationThread,this);<br />
return TRUE;
}
|
|
|
|
|
raner wrote:
Why isnt the below code working?
What do you mean? Does it not compile, does it not call your thread function, what?
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|