|
AbbyIndian wrote: Looks I am using the wrong combination of the last 2 params
'lpServiceStartName' and 'lpPassword'...
I am providing...".\user" in 'lpServiceStartName' and pwd in 'lpPassword'
NT AUTHORITY\NetworkService is a special built-in user account.
I believe the lpServiceStartName param sould be be "NT AUTHORITY\NetworkService"
and the lpPassword param should be "" (an empty string). Check the docs!
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Hi Mark
Yeah..the docs say that and I have used that combination...but its not working.
The function returns Error Code 87..which is 'ERROR_INVALID_PARAMETER'
H E L P !!!
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
Can you post the code for the entire CreateService() call?
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Hi..
Here's the relevant code
SC_HANDLE hSCM = ::OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
SC_HANDLE hService = ::CreateService(
hSCM, m_szServiceName, m_szServiceName,
SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS|SERVICE_INTERACTIVE_PROCESS,
SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL,
szFilePath, NULL, NULL, _T("RCQSS\0"), _T("NT AUTHORITY\NetworkService"), NULL);
..The problem is in the last 2 params only...coz if I make the last 2 params NULL,NULL...the
service gets created and entries are made in the registry with Objectname=LocalService
And I want the ObjectName to be 'NT AUTHORITY\NetworkService'
Another possibility: Maybe, some others params don't just create the perfect combination
when the service name is NetworkService..and hence they also need to be changed when the second last param is 'NT AUTHORITY\NetworkService'...
Thnx
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
Is _T("RCQSS\0") a valid group name? If so, what if you try _T("+RCQSS\0")?
The last two params can affect others. Just for fun, try removing the SERVICE_INTERACTIVE_PROCESS
flag and see if it works.
Also, an empty string (_T("")) should be passed as the last parameter instead of NULL, although
that's most likely unrelated to the problem.
I'm also not sure if you can use SERVICE_ALL_ACCESS access rights under the system network
account.
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Hi there,
I'm now doing a dialog based application. I have 2 custom control with CWnd base class.
however, one custom control have a vertical and horizontal scroll(lets call it cunstom control 1) and the other (custom control 2) have none. Both is placed side by side. The problem now is , i want to allow the custom control 2(without the scrollbar) to be able to scroll vertically simultaneously when the scrollbar of the custom control 1 is being clicked. Both of the custom control have its own class and how can i do this properly? Any ideas?
Thanks for all constructing ideas.
|
|
|
|
|
overide the WM_HSCROLL and WM_VSROLL message of cunstom control 1. When ever a message of this type arrives, send that message to the cunstom control 2 also.
nave
|
|
|
|
|
Thanks for the reply. Can you give me some examples on how to overide the WM_HSCROLL and WM_VSROLL message? I don't quite understand what you mean. I'm a begineer here, and help is really appreciated for my learning.
Thanks
|
|
|
|
|
|
I've read and also tried to convert and modify it to use for custom control with CWnd application. However the custom control does not scroll synchronously. Can you give me some tips on how to use modify it? I'm a begineer here and i hope that some people here may help me in this.
Thank you
|
|
|
|
|
so i hope when the scroll bar of first custom control is moved, it sends the WM_HSCROLL or WM_VSCROLL message to the 2 nd coustome control also.
So handle the WM_HSCROLL and WM_VSROLL messages in the second window and call ScrollWindow() inside it.
nave
|
|
|
|
|
I am doing a speech SDK related program, below is the code. its designed function is to read the text and save the speech into .wav file. But no voice can be heard when the exe running, I only got the .wav file after the exe finished, what I need is when the program run is running, users can hear the voice, at the same time, the sound is being processed into .wav file.
Thanks for help!
========================================================================
#include <sapi.h>
#include <sphelper.h>
#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"sapi.lib")
int main(int argc, char* argv[])
{
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
return FALSE;
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
CComPtr<ispstream> cpWavStream;
CComPtr<ispstreamformat> cpOldStream;
CSpStreamFormat OriginalFmt;
pVoice->GetOutputStream( &cpOldStream );
OriginalFmt.AssignFormat(cpOldStream);
hr = SPBindToFile( L"e:\\output.wav",SPFM_CREATE_ALWAYS,&cpWavStream,&OriginalFmt.FormatId(), \
OriginalFmt.WaveFormatExPtr() );
if( SUCCEEDED( hr ) )
{
pVoice->SetOutput(cpWavStream,TRUE);
WCHAR WTX[] = L"<voice required="\"gender=female\"">Hello world!";
pVoice->Speak(WTX, SPF_IS_XML, NULL);
pVoice->WaitUntilDone( INFINITE );
pVoice->Release();
pVoice = NULL;
}
}
::CoUninitialize();
return TRUE;
}
------------------------------------------------------------------------
Iphone service porviders list
------------------------------------------------------------------------
|
|
|
|
|
|
thanks, but i like to earn some code
sepel
|
|
|
|
|
sooo... you want to distribute a program via a image? a virus perhaps?
.. I dunno why but alot of the people here seem to want to do something oddly suspicious. correct me if im wrong though.
|
|
|
|
|
yes i want to embede my exe in an image but not as only as a virus.
you are right .so can help me?
sepel
|
|
|
|
|
in that case i would be glad to help. if only i knew how. Have you seen this done before, so that you know it is possible? the only way i can think of it being possible is if there is a program on the target computer that can extract the .exe once it arrives inside of it's image.
|
|
|
|
|
yes it seems to need a program on client but i try to find a better solution
for it .such as execute it on cclick;
what are you tihk about subseven ?
how it work?
it send a exe file in a piture to client then wait for it's information .
i think taht there is a way .
sepel
|
|
|
|
|
Hi,
In one of my projects i am reading data from a XML file.
The file looks like this.
<ExtensionInfo >
<ObjectExtension>
<Extension Name="test123" ExtensionType="SymbolExtension" InheritedFromTagName="" / >
<Extension Name="test123" ExtensionType="ScriptExtension" InheritedFromTagName="" / >
</ObjectExtension>
<AttributeExtension / >
</ExtensionInfo>
when i pass test123 ,get_nodeValue is returning SymbolExtension.
But if you look at the above file, you can notice that ScriptExtension extension name also test123.
Is there any way to get ScriptExtension ,rather than SymbolExtension.
Thanks in Advance
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
NiceNaidu<extension name="test123" extensiontype="SymbolExtension" inheritedfromtagname="">
<extension name="test123" extensiontype="ScriptExtension" inheritedfromtagname="">
Doesn't these two qualify as separate nodes in this case ?
|
|
|
|
|
I did not understand u r Q ??
But my Q is how will the search be done in XML.
Is there any chance of getting all nodes ??whose texts are same (in this case "test123")
Thanks
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
NiceNaiduI did not understand u r Q ??
I mean to say, if they are two separate XML nodes, you need to use get_nodeValue on that node's IXMLDOMNode pointer.
NiceNaiduIs there any chance of getting all nodes ??whose texts are same (in this case "test123")
You need to traverse doucment for that.
p.s. - Dont use SMS english, for others disliking here.
|
|
|
|
|
Ok..
Thanks for the reply and also for your suggestion.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Use XPath and do a select for //Extension[@Name='test123'] which will return a collection of all nodes with the given Name attribute. Then you can iterate over that collection and do whatever you need to with the <Extension> nodes
|
|
|
|
|
Thanks Dunn,
This is what i am looking for.
Thanks again.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|