|
|
Got the answer -
objCOM = Activator.CreateInstance(Type.GetTypeFromCLSID(New Guid("{4B117F12-37D1-4C19-93C8-4B318594E2A3}")))
|
|
|
|
|
i used builder 6 and got the whole cppbrowser to work but now i want to save the html into a text file,how do i convert the IDispatch to string?
this is what the help tells me.but honestly i don't understand
"Use Document to access an IDispatch interface for manipulating the contents of the HTML document through the COM object model. If there is no active document, Document is NULL. That is, you must first load a document using the Navigate or Navigate2 method before you can manipulate it using the Document interface.
For more information about this interface, see the document object section of Microsoft’s Dynamic HTML reference."
|
|
|
|
|
IDispatch is the standart interface, why you need it save?
The help just known you that Document inherited from IDispatch.
If you want to save html look for methods in Document that allow you to get HTMLBody as string and after that save it.
|
|
|
|
|
there where no methods for getting the string.but i got it working.
why i wanted to save the html was for the "background" history on the pc just for fun.
|
|
|
|
|
Hi,
I am trying to create a user in WinXP using ADSI.
I am facing problems in executing ADsGetObject.
When I try binding to LDAP using WKGUID, it gives an error.
Part of my code is:
--------------------------------------------------------
hr = ADsGetObject(TEXT("LDAP://10.175.80.24/rootDSE"),
IID_IADs,
(void**)&pRoot);
// Function written above works fine.
if (FAILED(hr)) {
wprintf(L"Bind to rootDSE failed: 0x%x\n", hr);
return hr;
}
hr = pRoot->Get(L"defaultNamingContext",&var);
wcscpy(adsPath,L"LDAP://<wkguid=");
wcscat(adspath,l"aa312825768811d1aded00c04fd8d5cd");
wcscat(adspath,l",");
wcscat(adspath,var.bstrval);
wcscat(adspath,l">");
hr = ADsGetObject(adsPath, IID_IADs, (void**) &pIADs);
// This function written just above is failing: hr is a negative value/
// pIADs comes as NULL
hr = pIADs->Get(L"distinguishedName",&var);
//At this point application crashes obviously as pIADs is NULL.
-------------------------------------------------
The 'adspath' gives the correct path as :"LDAP://<wkguid=aa312825768811d1aded00c04fd8d5cd,dc=patni,dc=com>"
I used ADsGetLastError to check the return code. But return code is success (i.e. zero)
Im unable to understand where am I going wrong.
Can anyone please help me resolving this problem?
Thanks,
Manasi
|
|
|
|
|
i want to download free ebooks on win 32 api
|
|
|
|
|
hi can any one tell me hw shud i proceed to develop a application for internet cafe.likewise we have a server and many clients.to have connection between them by providing them username ,password + time to access the web.also a windows form so dat if any one wants to continue then user shud provide the time to extend and this shud be saved on server.
|
|
|
|
|
i have worked a simple com server application
but while buiding it has not generated the .h file
which i must incorporate in the client file.
by .h file, i mean the .h header file.
is there anything that i can do with the setting?
i am working on visual studio 6.0 IDE.
|
|
|
|
|
compile your IDL file using MIDL compiler and it will generate te required header files.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
i want to call remote class library using .net. if any one have easy process pls suggess me.
atul
|
|
|
|
|
Hi,
How to know how many clients are connected to the COM Component at pirticular time
Thanks
Nandu
|
|
|
|
|
To know no. of clients connected to your COM component, you need to create a COM+ Application.
1)->Control Panel->Admi. Tools->COM+ Applications->Computers->My COmputer->Applications->Create an empty application
2)Add your component in it, in it's components node. then
3)Export that aplication, select Application Proxy option, it will create .msi and .zip files
4)Install this .msi file on required clients.
When this component if being accessed by cleints, you can view the count of active objects of that component in
Control Panel->Admi. Tools->COM+ Applications->Computers->My COmputer->Applications->Your Aplication Name->Components
then select "detail view".
If this solves yr. problem pl. Replay me.
Rahul Patil
rp7799@rediffmail.com
|
|
|
|
|
This is good, I came to know some thing new.
But at code level shall we use referece cout to check how may clients are connected ..it is right?
Nandu
|
|
|
|
|
There is a library "COM+ 1.0 Admin Type Library" using which you can check and set state of various COM+ Application's state such like checking status and adding components to it at runtime as well as exporting application etc.
To do that you can set reference of that library in VB 6.0 IDE and check various Methods and Properties it supports.
Some of Useful Methods are
Dim loApp As New COMAdmin.COMAdminCatalog
loApp.GetComponentVersionCount(,,,)
loApp.GetMultipleComponentsInfo()
Rahul Patil
|
|
|
|
|
|
<big>HI ALL <br />
<br />
PLEASE HELP ME. I am stuck on this point and can't do any progress in my project.<br />
<br />
Currently, I am using Domain Environment. I have Active directory and I want every users when they login to the domain, a program (.exe) file will run on there machines.<br />
<br />
This as you know, can be done by configuring logon script through GROUP POLICY ( from active directoty).<br />
<br />
Any how, when I run the (.exe) file generated when compiling the code in my local machine ( THE server that host the active directory), it works well.<br />
<br />
BUT, when the users try to login and run (.exe) file the follwing error generated:<br />
<br />
************************************************** **********************************<br />
<br />
System.Security.SecurityException: Request for the permission of type'System.Security.Permissions.SeurityPermission ,<br />
mscorlib, Version=2.0.0., Culture=neural, PublicToken=b77a5c561934e089' failed<br />
<br />
<br />
at System.Security.Principal.WindwosIdentity.GetCurre nt()<br />
<br />
at TestConnection.Program.Main(Straing []args)<br />
<br />
The action that failed was:<br />
<br />
Demand<br />
<br />
The type of the first permission failed was:<br />
<br />
System.Security.Permissions.SecurityPermission<br />
<br />
<br />
The zone of the assembly that failed was:<br />
<br />
Internet<br />
<br />
<br />
************************************************** *********************************<br />
<br />
As you can see from the execption. when I use the method WindowsIdentity.getCurrent()<br />
<br />
<br />
it fails why? Howover, when I use any symbol method only let's say " Console.WriteLine() >> this will work.<br />
<br />
<br />
I found something intersting about changing the security of the project by browsing to the solution explorer then open the PROJECT PROPERTIES<br />
<br />
THEN YOU GO TO SECURITY.<br />
<br />
But I couldn't understand how to change the security of my code to make it run in any PCs requesting it from the Server.<br />
<br />
I think the whole problem is a permission problem?? SO PLZ HOW TO SOLVE IT</big>
|
|
|
|
|
Hello
I am working on a COM project in which i use Interface Inheritance.
The IDL file looks like this,
interface IEarthInterface : IUnknown
{};
interface IOceanInterface : IEarthInterface
{};
interface IPacificInterface : IOceanInterface
{};
interface IAntarticInterface : IOceanInterface
{};
interface IDataInterface : IUnknown
{};
interface IFindInterface : IDataInterface
{
HRESULT GetOceanTypeInterface(IOceanInterface** pOceanInterface);
};
From inside IFindInterface i need to figure out which Ocean is currently attached and then attach or typecast
it was IOceanInterface and send it back to client.
All i wanted to know is how to get a Interface pointer from inside another Interface.
ie, can i call CoCreateInstance or QueryInterface from inside IFindInterface and get the
Interface Pointer to IPacificInterface or IAntarticInterface.
I been already told that CoCreateInstance will not work in this case.
Any idea how to implement this?
Thanks in advance.
|
|
|
|
|
Hi
In DllGetClassObject we create a classfactory and our classfactory's Createinstance function creates our class.
But why don't we create our class in DllGetObject directly instead of creating another class. What is wrong/absence with this?
I don't understand the concept of the creating ClassFactory in COM.
Can you please help me to understand it.
Thanks.
|
|
|
|
|
Hi,
I want the change the user bitmap in Win XP.
(That can be seen when we click on start button in Win XP. On start button click, start menu appears and at the top the username is displayed with the user bitmap next to it.)
These bitmaps are stored in the system at location : "C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\Default
Pictures"
These can be changed in the system as : control panel >> user accounts >> pick an account to change (select an accnt) >> change my picture.
I want to change this picture programatically.
Im creating the user using API 'NetUserAdd'. I could find no method for adding a bitmap using Netxxx APIs.
Im trying to add the picture using ADSI and referred link http://support.microsoft.com/kb/292029
The code compiles and runs but bitmap doesnt get changed.
Can anyone please guide me for using this API?
Thanks,
Manasi
|
|
|
|
|
I created a simple COM+ app in the following way
c# class library is
public class SimpleCOM:ServicedComponent
{
public SimpleCOM()
{
}
public string Message()
{
return "This is COM app";
}
}
I assaigned a strong name
register component like this
>regsvcs /appname:TestCom ComApp.dll
i getting the following warnings
WARNING: The assembly does not declare an ApplicationAccessControl Attribute. Application security will be enabled by default.
I want to access SimpleCOM in my another application c# library
in AddReference>what i have to select
|
|
|
|
|
If there a way to get the system context menu for a folder item when the item is inside an NSE folder?
What I have is a real filesystem folder marked as 'system' with a desktop.ini pointing it to a NSE, the NSE displays the items that exist inside the folder along with some other stuff. Now I need to display the standard windows context menu for the items, but the IContextMenu is requested from the NSE, is it possible to make get an interface for the system context menu?
Thanks in advance.
|
|
|
|
|
Hi all,
I've an ActiveX control with me and i want to aggregate this ActiveX control from an ATL component.How can i do this? Anyone please help me.
Thanks in advance
ss
|
|
|
|
|
Hi
I open a DB connection using the _ConnectionPtr pointer. After using the connection I call the Close() and set the pointer to NULL. When I set the pointer to NULL an exception is generated. Pleae let me know is it really required to set the object to NULL after Close().
Thanks in Advance
|
|
|
|
|
I found an example in MSDN 2003 where NULL setting object omited. The sample name is
"ConnectionString, ConnectionTimeout, and State Properties Example (VC++)"
|
|
|
|