Dear Tim Roberts,
Thanks for your kindly comments. Pls see my question as below letter in blue
and give me some suggestion accordingly.


Huang Guan wrote:
>
> 1). While using pythoncom develop com+ serivce, executed triumphantly.
> But why the pythonservice appear in windows process administer always?
> Is there any method to let pythonservice disappear from windows
> process administer?

Do you mean Task Manager? I don't want you to hide your service from me.
It's my computer, and I want to know exactly what's running.


{Yes, I am writting a similar module. An general user of windows user group
could shut pythonservice.exe in the task manager, and my python
service would be shutdown in the same time.Is there any good ways except
hide pythonservice.exe process?}

> > 2). While using pythoncom develop com+ sever, below variable have been
> > set:
> > _svc_name_='myservice'
> > _svc_display_name_='myservice display name'
> > _svc_description_='myservice description'
> > Why it can't display server manufacture in the msconfig of windows xp?
> > How can I have the result as follow:
> > eg: service name:VMware DHCP Service, service manufacture:VMware,Inc.
>
> Msconfig gets this information by reading the "version" resource from
> the service executable. The executable in your case is
> "pythonservice.exe" which does not have a "version" resource.
>
> It is possible to modify the resources of an executable, and there are
> tools to do so. Thus, you may be able to insert a version resource into
> "pythonservice.exe," but I would suggest that it is too much trouble.



{I use ResHacker tool to change the Version info of vmnetdhcp.exe file,
change 'VALUE "CompanyName", "VMware, inc."' to be 'VALUE "CompanyName",
"VMware,Crop."',then,show "VMware.Inc" in Msconfig successfully, as"
Vmware.Crop.",But I use the same method on pythonservice.exe,it doesn't
work? How can I do for it?}

> 3). while using pywin32 to control IE, make sure spring
> > OnDocumentComplete affair already, thance, to load local HTML file to
> >
> > IE, code as below:
> > v_s=v_iexplore.Document._oleobj_.QueryInterface(\
> > win32com.client.pythoncom.IID_IPersistStreamInit)
> > if v_s:
> > print 'Exists pythoncom.IID_IPersistStreamInit '
> > v_s.InitNew()
> > Now it's sure that it initializtion the DHTML controller of IE
> > successful, and return a PyIPersistStreamInit object, but according to
> > the help from pywin32, there is only one initNew()method in
> > PyIPersistStreamInit object.
>
> Unless you have used "makepy", the Python "help" doesn't know all of the
> available properties and methods. In this case, it knows about "InitNew"
> because you called it.
>
>
> > So What's the method load(),Save(),Release() for PyIPersistStreamInit?
> > How to find it? How to carry out the similar VC code function as below:
> > hr = pPersistStreamInit->InitNew();
> > if ( SUCCEEDED(hr) )
> > {
> > // Load the contents of the stream.
> > hr = pPersistStreamInit->Load( pStream );
> > }
> > pPersistStreamInit->Release();
>
> You should be able to use "v_s.Load( pStream )".



{without using makepy, according to below suggestion by Mr.Roger:
        ie.Navigate('about:blank')
        p=ie.Document._oleobj_.QueryInterface(
pythoncom.IID_IPersistStreamInit )
        p.Load(<PyIStream that contains content>)
in existence p.Load() method confirmed,but how to do could use P.Save() save
PyISteram to a string variable(include Html header info)?How to do could
load to ie.document via p.Load() from HTML SOURCE string variable? This is
my greatest concern problem.I re-sent this question to Roger and pywin32
mail list, pls do me the favor on these problem. Thank you. }

additional attached(:
4). While using pywin32 to control IE,
It's certain that using win32com.client.Dispatch return IE object.
It can execute the JavaScript method of current transfer page,
the following code has been execute and come through:
    v_iexplore=win32com.client.Dispatch('InternetExplorer.Application')
    v_iexplore.Navigate('
http://www.cpplab.com/Articles/JSCalls/TestPage/JSCallTestPage.htm'
<http://www.cpplab.com/Articles/JSCalls/TestPage/JSCallTestPage.htm%27>)
    v_id=v_iexplore.Document
.Script._oleobj_.GetIDsOfNames('Welcome')
    v_iexplore.Document.Script._oleobj_.Invoke(\
          v_id, 0, win32com.client.pythoncom.DISPATCH_METHOD, True,\
          'HuanGuan')
But: It can't execute the above code exactly In the
win32com.client.DispatchWithEvents return IE object.
How to solve this problem ? Would you pls kindly to show me some examples?



--
> Tim Roberts, [EMAIL PROTECTED]
> Providenza & Boekelheide, Inc.
>
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to