|
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++)"
|
|
|
|
|
It's a COM + C#/.NET issue, so published in both, sorry...
************************************************************
I have an in-process COM server in VC++2005, events of which i'm trying to use in C#. After a very short session the following happens:
I can see in debugger of VC++: [Frames below may be incorrect and/or missing, no symbols loaded for rpcrt4.dll] coming from the C# client.
At which point the C# calls Unadvise into my event interface, and i stop receiving events.
In the meantime, the interface continues working in C# properly. The question is: why on earth C# drops the events handler and how to fight this?
************************************************************
P.S. If I track the moment when connection has been unadvised, and try to re-connect again, C# throws: System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
at System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
Free C++ libraries with source code on www.neatcpp.com: TWAIN, DirectShow, Interprocess Communications, etc...
|
|
|
|
|
VitalyTomilov wrote: I can see in debugger of VC++: [Frames below may be incorrect and/or missing, no symbols loaded for rpcrt4.dll] coming from the C# client.
Can you post the stack trace?
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Please see my answer there below... It's a nice one ))
Free C++ libraries with source code on www.neatcpp.com: TWAIN, DirectShow, Interprocess Communications, etc...
|
|
|
|
|
I seem to have found the problem, which also is a horrible revelation, another .NET bug, I think… So, this is what it was…
In a simple scenario, you bind COM event to your C# handler via += operator, for YourInterfaceVariable.EventName += New MyHandler, which seems to do the job fine.
Now consider a little more complicated scenario, where your main interface doesn’t expose events. Instead, it exposes a property of another interface, which in turn exposes events. Now, you want to attach a C# event handler to that internal interface via the property, obviously, so you give the command: VariableName.PropertyName.EventName += new MyHandler.
By all logic, this must work, and it even does, for a while, a few calls, 10-30, as all-of-a-sudden, your events stop coming in!!! You start asking yourself why, and the answer is astounding: C#/.NET doesn’t support such internal references properly, and at some point they seem to get into the automated garbage collection, or so it would seem. How do I know? That’s simple: I declared another variable of type of the internal event interface, then set it at run time, and did C# binding onto that variable instead its reference through the containing interface. And that solved the problem, the event handler no longer looses the connection.
Now how do you like THEM apples! Am I far indulging into Microsoft hatred or that’s really another screw up on their part?
Any comments are welcome.
Free C++ libraries with source code on www.neatcpp.com: TWAIN, DirectShow, Interprocess Communications, etc...
|
|
|
|
|
can you show me an example of the same ...
i am using WWVDashboard.ocx inside my project
WWVDashboardClass dashboard = new WWVDashboardClass();
dashboard.OnGetImgPath += new WWVDashboardEvents_OnGetImgPathEventHandler(dashboard_OnGetImgPath);
// RECEIVING ERROR ON THE NEXT LINE
dashboard.OnGetpicture += new IWWVDashboardEvents_OnGetpictureEventHandler(dashboard_OnGetpicture);
dashboard.OnGetThumbInfo += new IWWVDashboardEvents_OnGetThumbInfoEventHandler(dashboard_OnGetThumbInfo);
.. also it has got several interface like
IWWVDashboardEvents_Event (internal event interface)
i had read your previous reply but
i dont know how to achieve that....please help me out.
|
|
|
|
|
Do you want to replicate the problem i had or to solve the problem?
This problem came to me a while ago, i posted it on Microsoft, they recognized the problem and said that the workaround that i came up with myself was the rigth way, which sounded kind-of bad.
Anyways, if you have a property that exposes COM events, you need to declare a global variable of the property type, then set the variable from the beginning, and only then attach events to your global variable. You cannot attach events directly to a property that exposes events, because such event attachment gets automatically garbaged by .NET after some time, so you stop receiving events permanently.
Regards,
Vitaly
|
|
|
|
|
thanks for your instant reply....
|
|
|
|