|
My DCOM server works very well in Intranet,but In Internet it can not work,I always get the error of 0x800706BA!
How can I do? thanks!
Johnson Wen in china
|
|
|
|
|
Hi everybody,
I've got a strange thing using my DCOM application(s).
I wrote both server and client, and one of the last issues I can't resolve is the following:
On the server machine (EXE Server with MFC) I have the following class method (with implementation):
STDMETHODIMP CAugVisionEngine::ReadText(BSTR CharSetName, int pTop, int pLeft, int pHeight, int pWidth, BSTR *OcrString)<br />
{<br />
AFX_MANAGE_STATE(AfxGetStaticModuleState())<br />
... [code omitted here for brevity]
...
char* strTemp = (char*) malloc(sizeof(OcrReport_tmp->readString)+1);<br />
strcpy(strTemp, OcrReport_tmp->readString); <br />
*OcrString = W2BSTR(A2W(strTemp));<br />
<br />
return S_OK;<br />
}
where the last parameter, the BSTR, is the return value of the function (just [out], not [out, retval])
When I call the function from the client (for now MFC application, just to test, but the release will be a console application), in a way like this:
BSTR OCRBSTR;<br />
<br />
pIVE->ReadText ("C:\\Patterns\\3260\\05042800\\1235.abc",40, 249, 48, 83, &OCRBSTR);
I get that the server constructs the BSTR correctly (at least, it seems to do it, since a logfile is populated correctly), but my client retrieves nothing...
I'm stuck...
Any ideas?
Thanks in advance,
Morenz.
|
|
|
|
|
your code doesn't seem to have problem.
morenz wrote: *OcrString = W2BSTR(A2W(strTemp));
As you said, this value you are writing in log file, isn't it?
-- modified at 4:56 Tuesday 14th November, 2006
|
|
|
|
|
yes, I'm writing it in a file as a string. When I debug it, I see that the BSTR has the correct value, too...
For now I workarounded it, making the client open the file directly on the server and getting the string itself, but it's not elegant...
|
|
|
|
|
im using .net 2k3, office 2k3
well every thing was working fine, but after a week during which i've
not edited/used my code !!! and now everything is in mess...
please help me to solve this problem..
dim applicationObject As Object
WithEvents outApp As Outlook.Application
while assigning,
outApp = applicationObject
i'm getting error,
message => "Could not load type
Outlook.ApplicationEvents_11_NewMailEventHandler from assembly
Interop.Outlook, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null."
Err.Number => 429
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Hello,
I can't figure out how to derive a class from an interface with pure functions side by side a class that implements those functions and use those functions in place of the pure ones. That is:
interface BaseInterface : public IUnknown
{
};
interface DerivedInterface : public BaseInterface
{
STDMETHOD_( INT, AddNumbers )( INT LHS, INT RHS ) PURE;
};
class BaseInterfaceImpl : public BaseInterface
{
STDMETHOD_( ULONG, AddRef )()
{
return S_OK;
}
STDMETHOD_( ULONG, Release )()
{
return S_OK;
}
STDMETHOD( QueryInterface )( REFIID RefIID, LPVOID *ppObject )
{
return S_OK;
}
};
class DerivedInterfaceImpl : public DerivedInterface, public BaseInterfaceImpl
{
public:
STDMETHOD_( INT, AddNumbers )( INT LHS, INT RHS )
{
return LHS + RHS;
}
};
MSVC gives me the error:
c:\documents and settings\todd\my documents\visual studio
2005\projects\whitehall\toying with c++\toying.cpp(72) : error C2259:
'DerivedInterfaceImpl' : cannot instantiate abstract class
due to following members:
'HRESULT IUnknown::QueryInterface(const IID &,void **)' : is
abstract
d:\program files\microsoft visual studio
8\vc\platformsdk\include\unknwn.h(113) : see declaration of
'IUnknown::QueryInterface'
'ULONG IUnknown::AddRef(void)' : is abstract
d:\program files\microsoft visual studio
8\vc\platformsdk\include\unknwn.h(117) : see declaration of
'IUnknown::AddRef'
'ULONG IUnknown::Release(void)' : is abstract
d:\program files\microsoft visual studio
8\vc\platformsdk\include\unknwn.h(119) : see declaration of
'IUnknown::Release'
I've got the source code of my dummy-test scenario at
http://lanlocked.net/junk/toying.cpp. I managed to get it to work by
deriving DerivedInterface from BaseInterfaceImpl but I don't see this
as a solution, rather a workaround (I'd like to keep the interfaces
"clean" and 100% pure). If it's impossible to do what I'm trying to do,
what are the other methods of inheriting in COM?
Thanks in advance,
Todd
|
|
|
|
|
Inactive Cargo wrote: managed to get it to work by
deriving DerivedInterface from BaseInterfaceImpl but I don't see this
as a solution, rather a workaround
Whats problem with this?
Inactive Cargo wrote: (I'd like to keep the interfaces
"clean" and 100% pure).
Can you explain this ?
Inactive Cargo wrote: c:\documents and settings\todd\my documents\visual studio 2005\projects\whitehall\toying with c++\toying.cpp(72) : error C2259: 'DerivedInterfaceImpl' : cannot instantiate abstract class due to following members: 'HRESULT IUnknown::QueryInterface(const IID &,void **)' : is abstract
It is because, compiler doesn't find definition of this function. Dont combine it with one in BaseInterfaceImpl .
|
|
|
|
|
Dear All,
I am new to this COM usage in VB6. I created a COM object and it was given me a dll file and also installed to the computer so I can get the dll in References in VB6.
I typed the example code given in the MatLab and also a sample code Building COM Components Using MATLAB - Part I by A Riazi, But It giving me an error message called "Automation Error. The specified module could not be found".
Please help me to go throught this.
Thaks All
Prageeth
Dhanushka P
|
|
|
|
|
Hi,
How do I create an ActiveX control in VB 6 which will install a certificate to Internet Explorer's Personal Certificate category automatically with the click of a button named "Install Certificate" in IE's web page.
Kindly provide me the code required for the ActiveX control.
Thanks in advance.
Subrahmanyam K
|
|
|
|
|
I've added a dll (added as refernce)
and I am trying to create a new class from the dll
but I get this error:
Retrieving the COM class factory for component with CLSID {DD683B25-1820-412E-AA8A-7AA92321EBC8} failed due to the following error: 8007007e.
in the tips: it tell me something about the location
of the dll and it not being found
can someone please help me?
|
|
|
|
|
i want the code for x to the power n divided by n factorial
aman
|
|
|
|
|
i am working on a project which is a namespace extension which supports drag and drop of file between windows folder and our namespace folders. The technique used to drag and drop a file from our namespace folder to windows folder is like this:
1. when drag is initiated,
a)details of the dragged object are stored in a global variable.
b)IDataObject(which supports 2 formats-CF_HDROP for between windows and private format for between our namespace folders) is created and drag loop is initiated by calling DoDragDrop().
2. In IDataobject::Getdata, for CF_HDROP format, a temp dir is created and the path is written to clipboard.
3. we have a copy hook handler which actually does the work of copying the file from namespace folder to windows folder.The Copycallback method of copyhookhandler gets the info from global variable and puts into windows folder and returns IDNO.
The product is working on thousands of systems correctly but on a perticular system with xp its not working.
log files show that IDataObject::GetData() is called n times with CF_HDROP , temp folder is created and folder path is written to clipboard. But ICopyHook::copyCallback() is not called.Deleting the copyhook handler registry key should create the temp folder(as we have placed this folder path on the clip board in IDataObject::Getdata() and our copyhook handler is not present) in drop target but its not happening here.
what might have gone wrong?can anyone help me?
|
|
|
|
|
I am writing a attributed COM component in Visual Studio .NET 2003 (VC++ 7.1). For reusing the types defined in some other TLB, I want to import this TLB that I do by inserting the following line in stdafx.h.
[ importlib("test.tlb") ];
This 'importlib' attribute places this line in the library block of the IDL file. However, now if some of the interface methods in my COM component want to return an interface defined in test.tlb, it gives me IDL compilation error.
Perhaps, it is probably since the automatic IDL generation by the compiler puts all the interface declarations of my component outside the library block, and the importlib attribute generates the importlib line inside the library block... and, so the interface declarations of my component are not able to recognize the interface types defined in the imported type library.
Can anyone suggest me if I am importing the library in a wrong way, or if there is any other solution to it ?
Thanks & Regards,
Arun
|
|
|
|
|
Hi all
I Am working on windows server 2003 cluster and i need to use WMI for this..
can i know what all we can do with WMI for clusters etc
can i have some script examples for this
Thanks in advance
abhi
abhi
|
|
|
|
|
Hi
As we list all the shared assemblies in GAC using gacutil on a paritcular system.
Is there any way to list or find all those assemblies which are registered as COM component using regasm either programmatically or through some utility.
Regards
Kamal Chauhan
|
|
|
|
|
Reposting a question multiple times and adding "Very Urgent" to the subject is not going to get you an answer, just annoy people.
Have you tried using google ?
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
Hi
As we list all the shared assemblies in GAC using gacutil on a paritcular system.
Is there any way to list or find all those assemblies which are registered as COM component using regasm either programmatically or through some utility.
Regards
Kamal Chauhan
|
|
|
|
|
hi all
i developing a library use service Com+
that library is Server application proxy
When i Export type Application Proxy after that i setup file .MIS on orther computer but run is faile(Access is denied) so i have create Role for Com+ in Server(Everyone permisstion) ????
Network is LAN and workgroup
AND if on orther computer dosen't setup file MIS so that library become Server application .this much not security ??????
Some body help me
|
|
|
|
|
I developed an Add-in for Outlook 2003 with Visual Studio 2005 Team Suite.
My solution was created via:
Other Project Types -> Extensibility -> Shared Add-in
And I selected support for Microsoft Outlook.
Question 1:
I uncheched all the "Exclude" option of the assemblies in the Setup Project and builded it successfully.
The Add-in installed and ran well in another computer which had also VS 2005 Team Suite on it. However, on a third computer, which only had .NET Framework 2.0 but not VS 2005, the Add-in installed normally but did not load when Outlook started. What's the problem?
Question 2:
My CommandBarButton runs only a few times.
I added a CommandBarPopup to the Main Menu and then added a MsoControlType.msoControlButton to the popup. In the ClickEventHandler of the button, a Windows Form object is created and shown.
The problem is, each time I start Outlook, the button is available for only a few times, usually 2-3 times, sometimes only once. Afterwards it becomes unavailable at all. It gives no response when I click it.
Some of the codes are as follows:
//Acquire the "Menu Bar" and create a new control on it
menuBar = ((Outlook.Application)applicationObject).ActiveExplorer().CommandBars["Menu Bar"];
commandBarControl_CM = menuBar.Controls.Add(MsoControlType.msoControlPopup, 1, "", 6, true);
commandBarControl_CM.Visible = true;
commandBarControl_CM.Caption = "Sychronization";
//Add buttons to the newly created control
CommandBarPopup commandBarPopup_CM = (CommandBarPopup)commandBarControl_CM;
CommandBarControl commandBarControl_SI = commandBarPopup_CM.CommandBar.Controls.Add(
MsoControlType.msoControlButton, 1, "", 1, true);
commandBarControl_SI.Visible = true;
commandBarControl_SI.Caption = "Calendar Sychronization";
//Add button event handlers
CommandBarButton button_showinfo = (CommandBarButton)commandBarControl_SI;
button_showinfo.Click += new _CommandBarButtonEvents_ClickEventHandler(button_showinfo_Click);
private void button_showinfo_Click(CommandBarButton Ctrl, ref Boolean CancelDefault)
{
System.Windows.Forms.Form form_CalMng = new Form_CalMng();
form_CalMng.Show();
}
|
|
|
|
|
Question 2 has been solved. The button object has to be declared at class level.
But help me with Question 1, please!
|
|
|
|
|
OctopusThu wrote: However, on a third computer, which only had .NET Framework 2.0 but not VS 2005, the Add-in installed normally but did not load when Outlook started. What's the problem?
Are you sure its registered there? can you confirm it by seeing registry ?
Possibly its not registered there due to unavailablity of some dependent dlls.
|
|
|
|
|
It is right there in the registry:
HKLM -> Software -> Microsoft -> Office -> Outlook -> Addins -> OlCalAddin.Connect
It just does not load when I start Outlook......
I begin to believe that it has something to do with the developing environment. I tried the Add-in on two computers without VS2005 and got the same result, which is that the Add-in did not load. However, I tried it on another two computers WITH VS2005 on them and the Add-in loaded successfully.
Any hint?
OctopusThu
|
|
|
|
|
OctopusThu wrote: I tried the Add-in on two computers without VS2005 and got the same result, which is that the Add-in did not load. However, I tried it on another two computers WITH VS2005 on them and the Add-in loaded successfully.
Thats why I believe, its installation missing some dependent dll, which required to ship with that dll.
In case on VC2005 installed machines, that dll is already present there.
|
|
|
|
|
However, I unchecked all the "Exclude" Option of the assemblies in "Detected Dependencies" of the Setup project. That is to say, all dependent dlls are included in the Setup.(Except the global ones, e.g., System.Data, System.XML, etc...)
OctopusThu
|
|
|
|
|
OctopusThu wrote: " of the Setup project.
I never used this wizard. I use to check dependent dlls using dependency walker. See if it can throw some light on problem.
|
|
|
|
|