|
Hi All,
We have a imaging system application with a combination of COM components, extension dll and stand alone executables. Do we have a way of profiling the thread interaction at run time. Are there any tools available for this. My need is to do a profiling of thread interaction within and across processes.
Regards
Rajdeep
|
|
|
|
|
Hello:
I need to mux two mono audio pcm inputs into one stereo output. Does anyone have a simple DirectShow sample code that I can follow? Many Thanks.
Best Wishes,
Taiwu
|
|
|
|
|
i'm working on a project and i've got dis scenario, I need to read input from a Port -(COM(i)- where i can be any of the ports) and write it to a user(interface -may be a textbox). i'm using vb.net and not cracking it yet.any ideas on how can i crack dis
kwn
|
|
|
|
|
I've been given a VB example of how to use a hidden interface on a COM object. I need to implement this code in C++. The VB code uses the InMemoryRecordset object.
Dim objIMRS As New InMemoryRecordset
When I create a C++ wrapper class the InMemoryRecordset interface is ignored, but an IInMemoryRecordset interface class is created. InMemoryRecordset/IInMemoryRecordset don't exist in registry. The OLE Viewer sees the following in the TLB.
[
uuid(3DCB2383-3BF0-11D1-9211-006097383187),
hidden,
dual,
nonextensible
]
dispinterface IInMemoryRecordset {
properties:
methods:
[id(0x60020000), propget, hidden, helpstring("Returns the output Recordset.")]
GRecordset* OutputRecordset();
[id(0x60020001), hidden, helpstring("Append new read only field")]
GField* AddReadOnlyField(
[in, optional] VARIANT Collating,
[in, optional] VARIANT SourceDatabase,
[in, optional] VARIANT SourceTable,
[in, optional] VARIANT SourceField);
[id(0x60020002), hidden, helpstring("Append new read write field")]
GField* AddReadWriteField(
[in, optional] VARIANT Collating,
[in, optional] VARIANT SourceDatabase,
[in, optional] VARIANT SourceTable,
[in, optional] VARIANT SourceField);
[id(0x60020003), propput, hidden, helpstring("Indicates if ReadOnly property of a field is disabled ")]
void ReadOnlyDisabled([in] VARIANT_BOOL rhs);
};
How can I create an instance of an InMemoryRecordset object when I can only see it in VB?
Thanks
Dave
Dave
http://www.unit-conversion.com
|
|
|
|
|
Is there any method to connect to any web browser, not just IE. For example FireFox, Opera e.g
|
|
|
|
|
The detail is in the following:
Case 1:
1. Create a ATL Project in VS .Net
2. Add Class (ATL Simple Object) to the ATL Project.
3. Add a method [STDMETHODIMP CTestDll::Add(DOUBLE x, DOUBLE y, DOUBLE* result)]
4. Build it
The result is in the following:
http://slibody.dyndns.org/Case1.JPG
Case 2:(The problem happens when i add web reference to the ATL project)
1. Create a ATL Project in VS .Net
2. Add Web Reference
3. Add Class (ATL Simple Object) to the ATL Project.
4. Add a method
[STDMETHODIMP CSessionService::NewSession(BSTR UserID, BSTR PassWd, BSTR IP, BSTR Hostp, BSTR* NewSessionResult, LONG* NewSessionResult_nSizeIs)] <-- Using WebService
5. Build it
The result is in the following:
http://slimbody.dyndns.org/Case2.JPG
The error message is
NtuhWebService error PRJ0019: A tool returned an error code from "Performing registration"
How can i solve this problem?
Thanks ...
|
|
|
|
|
The detail is in the following:
Case 1:
1. Create a ATL Project in VS .Net
2. Add Class (ATL Simple Object) to the ATL Project.
3. Add a method [STDMETHODIMP CTestDll::Add(DOUBLE x, DOUBLE y, DOUBLE* result)]
4. Build it
The result is in the following:
http://slimbody.dyndns.org/Case1.JPG
Case 2The problem happens when i add web reference to the ATL project)
1. Create a ATL Project in VS .Net
2. Add Web Reference
3. Add Class (ATL Simple Object) to the ATL Project.
4. Add a method
[STDMETHODIMP CSessionService::NewSession(BSTR UserID, BSTR PassWd, BSTR IP, BSTR Hostp, BSTR* NewSessionResult, LONG* NewSessionResult_nSizeIs)] <-- Using WebService
5. Build it
The result is in the following:
http://slimbody.dyndns.org/Case2.JPG
The error message is
NtuhWebService error PRJ0019: A tool returned an error code from "Performing registration"
How can i solve this problem?
Thanks ...
|
|
|
|
|
I am new to COM so please be gentle.
I am trying to use COM as follows:
1) I have a client which I would like to load loosely coupled servers.
2) The servers need to be able to handle the following
a) I would like to have a function
HRESULT OnMessage( CSystem * pSys, CMessage * pMsg )
b) I need to be able to use CSystem and CMessage which only exist in the client.
What parts of COM should I use?
I am thinking that besides the basics I will need to use:
1) IDispatch
2) Marshalling ???
Can anyone shed any light or point me to some info?
|
|
|
|
|
smesser wrote:
HRESULT OnMessage( CSystem * pSys, CMessage * pMsg )
Nope. If you pass pointers, they will point to the address space of a different application, and in this case on a different machine. Also, the types which COM can pass are very limited.
You'd need instead to pass the data you need to recreate these classes, and the classes would have to exist in both projects, obviously.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for your response.
I have since decided to use abstract interfaces and abstract factories.
This combination seems to meet my needs without having to deal with COM.
|
|
|
|
|
Christian Graus wrote:
Also, the types which COM can pass are very limited.
That depends entirely on what clients you have. For VBScript clients, you'll have to dumb down your interfaces quite a lot. But with C++ clients, you can do virtually anything. All you have to do is play nice with the IDL language, which allows for powerful enough datastructures (structs and unions of arbitrary IDL compatible types). But yeah, you won't be doing any template magic through IDL anytime soon.
[edit]Straight VB handles pretty much everything that C++ does, too.[/edit]
Good music: In my rosary[^]
|
|
|
|
|
I'm trying to change the default tooltip Explorer shows for folders (when the mouse is hovering), using IQueryInfo interface. It works for files (.xxx) but couldn't make it work for folders.
Did anybody do it?
Also, is it possible to modify/subtract items from the Explorer context menu for folders?. I can add items using QueryContextMenu, (albeit not in the desired menu place), but can't delete/modify Explorer's items.
Suggestions will be appreciated.
TIA
alex
alex
|
|
|
|
|
I'm trying to develop an add-in for Outlook Express, the add-in is supposed to intercept sending mails and (optionally) add attachments to the mail being sent.
I have already done that on Microsoft Outlook using Visual Studio Tools for Office, but I couldn't find any way to do it on Outlook Express.
Help would be greatly appreciated, just point me on the way.
Thanks in advance,
Wessam Fathi
|
|
|
|
|
Wessam Fathi wrote:
I'm trying to develop an add-in for Outlook Express, the add-in is supposed to intercept sending mails and (optionally) add attachments to the mail being sent.
Check if this Help :-
http://www.codeproject.com/com/Outlook_Express_Messages.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Is it possible to have two applications, running as seperate processes, in the same window?
Is so, how or can you point me at a good reference source?
Thanks.
|
|
|
|
|
you can use threading. try search you will find lot on it..
|
|
|
|
|
Hi!
I wrote a context menu handler for a program which runs from an usb disk. The program is running fine on my PC, but some of my friends are complaining that as soon as the software is installed in their usb disk and the program is run their context menu goes away...and it gets ok when the unplug the usb disk again....any idea why this would be happening ?
Thanks.
kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
Hello code project community, I have following question.
I would like to access a com component ( all the funcitons within the COM component -- that basically access the database on the machine where COM is registered ) registered on a remote machine through a web page. How should i communicate with remote COM component from a web server ?
Scenario : Computer A -- WEB SERVER, computer B -- a client on which a com component is registered and database resides.
I would like to access a COM component from machine A, get result from database through COM object funciton call, and write it to the file on the server ( computer a )??? Any idea??
Can I make a remote call to COM component?
I am thinking that you could do it through .net remoting, but then client needs to run a listner on his/her machine. Another way is that You could have activex object accessing client, but then i need to send result back to server from client. Is there any nice way to send entire object from client browser to server?
Any suggesitons would be very welcome and very much appreciated. Thanks a lot.
Manish
|
|
|
|
|
I am lerning COM and this is as simple as I can get.
Here is my interface.h file
/////////////////////////////////////////////////////
extern "C" const IID IID_IMath;
// {2BD8F185-7D1C-4058-9B98-C29E343E858F}noblk
extern "C" const IID IID_IMath =
{ 0x2bd8f185, 0x7d1c, 0x4058, { 0x9b, 0x98, 0xc2, 0x9e, 0x34, 0x3e, 0x85, 0x8f } };
interface IMath
{
public:
virtual long Add(long n1, long n2) = 0;
virtual long Sub(long n1, long n2) = 0;
};
////////////////////////////////////////////////////
but if I add the math.cpp to my project is gives me the following
error message:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.
////////////////////////////////////////////////////////
here's my math.cpp
/////////////////////////////
#include "interface.h"
#include <iostream.h>
class CMath : public IMath
{
public:
CMath();
~CMath();
virtual long Add(long n1, long n2);
virtual long Sub(long n1, long n2);
};
CMath::CMath()
{
cout << "\nCMath Constructor called." << endl;
}
CMath::~CMath()
{
cout << "\n CMath Destructor called" << endl;
}
long CMath::Add(long n1, long n2)
{
return n1 + n2;
}
long CMath::Sub(long n1, long n2)
{
return n1 - n2;
}
I HAVENT BEEN ABLE TO FIND THE SOURCE OF THIS ERROR, Please Help!
Thanks
|
|
|
|
|
correction:
2nd line of math.cpp should read "#include <iostream.h>
|
|
|
|
|
Hi,
I've to develop 3 ActiveX controls.
Server - this will read the data and updates the data continuosly
ClientA - Gets the part of updated data from the server
ClientB - Gets the part of updated data from Server
There can be many instances of ClientA and ClientB and only one insatnce of the server in a contianer.
Can any one suggest me the best design pattern to implement this in VC++ or VB and how to implement this?
Thanks in advance!
VK
|
|
|
|
|
|
Not sure if this answers your question exactly, but here is some generalk information.
ActiveX DLLs and OCXs (which are nothing more than DLLs with a special wrapper) are always loaded into each process that calls them, so you cannot enforce a single instance of a server using either. you need to use an ActiveX EXE instead.
An ActiveX EXE component runs as a single instance by design with no special development on your part. In other words, the first time any client calls an ActiveX EXE, one instance of the server will be created. All additional calls by any number of clients will be handled by the one instance of the ActiveX EXE server that is already running.
The above only applies to the server component itself.
Suppose for example, you have 10 ClientA instances that call Server.EXE and request some class MyServerClass. The first ClientA that calls the Server.EXE will cause a single running instance of Server.EXE to be instantiated. When the remaining 9 ClientA components request a MyServerClass object, ALL of those requests will be serviced by the single instance of Server.EXE already running. BUT you will still have 10 instances of MyServerClass - one for each ClientA request - all being provided by the SINGLE instance of Server.EXE.
Assuming that what you really want is 10 ClientA components that all have a reference to a SINGLE instance of MyServerClass, provided by a SINGLE Server.EXE, then you need to also implement MyServerClass as a Singleton. This is easy to do in C++, a little harder to do (but still possible) in VB.
Do a web search on Singleton and ActiveX EXE and you should find plenty of examples.
Hope this helps.
Robert
|
|
|
|
|
My registry set up as follow:
REGEDIT4
[HKEY_CLASSES_ROOT\CLSID\{A138EF7F-0930-4bc5-B1AC-33E1D0415BEE}]
@="Shell Extension"
[HKEY_CLASSES_ROOT\CLSID\{A138EF7F-0930-4bc5-B1AC-33E1D0415BEE}\InProcServer32]
@="scshellext.dll"
"ThreadingModel"="Apartment"
[HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\{A138EF7F-0930-4bc5-B1AC-33E1D0415BEE}]
@="Shell Extension"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
"{A138EF7F-0930-4bc5-B1AC-33E1D0415BEE}"="Shell Extension"
For this setup, any file selection system will call my context menu entry. But select the directory, system will not call. Does any one know how to setup the registry that will cause the system to call the context menu when the directory has selected?
Thank you for the help in advance.
!@#$%^&*()_+
|
|
|
|
|
There is a key for the directory:
[HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{A138EF7F-0930-4bc5-B1AC-33E1D0415BEE}]
@="Shell Extension"
!@#$%^&*()_+
|
|
|
|
|