|
|
have a problem with an OLE document container, which is developed in VS 6.0 and by the use of ATL no MFC is involved.
It is so when a document is loaded in the container it is loaded maximized and the menu with comes with the document is show ok. But if I restore the document down and then maximize it again then is the menu/toolbar, which comes with the document, not correctly redrawn. If I then minimize the document and then maximize it seems to be OK again. I have tried to search for similar cases on the internet but no luck so if anybody have a proposal to the solution then it would be great - many thanks in advance.
Jakob
|
|
|
|
|
I am beginner to a com and want to learn com.
Please help
|
|
|
|
|
Been looking for and not finding a simple com (vb 6.0) dll with will let me decrypt and encrypt a data string. Lots of .net stuff and several enrcypt only ... but I need both.
Any help would be great
gollnick
Gollnick
|
|
|
|
|
hi friend i created a add-in for outlook 2003 and now i need to use it for outlook 2002 can it is used in outlook2002. friend of my tell me that the Architecture of MS-Office2002 is different from 2003 can any body tell what i should do??????????????????????
wasim khan
|
|
|
|
|
wasimsharp wrote: friend of my tell me that the Architecture of MS-Office2002 is different from 2003 can any body tell what i should do?
Ask him what the differences are and take it from there
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
From within the project server 2007 event handler when i try creating the MS Project COMponent I get this error. I'm running application on windows 2003 server, using C# on VS2005. I've already configured the security settings of dcom, giving rights to "Network Service" user for launching/activating the MS project component. There is no issue in creating the COMponent if I do so using simple dialogue based application. The error is reported only if creating from within the Project server event handler, which runs as an exe (Microsoft.Office.Project.Server.Eventing ) under the user "Network Service".
Any help plz
Madni
|
|
|
|
|
You mantioned that you "have already configured the security settings of dcom" - can you specify more:
what it the meaning of that? where did you do that - in the registry? under which path?
thanks!!
|
|
|
|
|
Thanks for replying . on "Run" you write dcomcnfg and press enter. A "component services" console is opened. expand "component services" -> Computers -> My Computer -> DCOM Config ... There in the tree i selected Microsoft Project Component. Right click -> properties and there configure the security settings ..
tm_xprt - Life is full of Dreams - But life isn't a Dream.
|
|
|
|
|
I create a COM dll through ATL. I'm using some other libraries like system libraries (MSVCRT.LIB LIBC.LIB) and own libraries in this dll. Dll can be register in release mode but when i try in debug mode it failed and give the error "initialization routine failed".
Please suggest how to resolve it. I have tried to use all release file of all libraries in debug mode. But problem is not resolve.
|
|
|
|
|
If i build ATL COM dll in debug mode then it's fail to register. If i build in release mode without debug info then it's register successfully. While in release mode if i generate debug info and try to register then again it's fail. The error in registering is initialization routine fail.
|
|
|
|
|
there is 2 others kinds of libraries: debug libraries and release libraries:
the debug are all end with D
you have to use the right dll - in order the registry will success.
you can check your dll with dependency walker
good luck!
|
|
|
|
|
Hi all,
I am trying to subscribe for events like this:
CComPtr<IDispatch> spDisp;
HRESULT hr = m_spWebBrowser2->get_Document(&spDisp);
if (SUCCEEDED(hr) && spDisp)
{
CComQIPtr<IHTMLDocument2, &IID_IHTMLDocument2> spHTML(spDisp);
if (spHTML)
{
CComQIPtr<IHTMLElement, &IID_IHTMLElement> spElem;
hr=spHTML->get_body(&spElem);
if (SUCCEEDED(hr))
{
IConnectionPointContainer* pCPC = NULL;
hr = spElem->QueryInterface(IID_IConnectionPointContainer, (void**)&pCPC);
if (SUCCEEDED(hr))
{
IConnectionPoint* pCP = NULL;
hr = pCPC->FindConnectionPoint(DIID_HTMLInputTextElementEvents2, &pCP);
if (SUCCEEDED(hr))
{
....
}
}
}
}
}
FindConnectionPoint fails.
Please show me where I am wrong or how else I can subscribe?
modified on Monday, August 4, 2008 7:38 AM
|
|
|
|
|
Thanks, I found the error.
|
|
|
|
|
The code sample is as below,
_bstr_t bstrwer(_bstr_t(charPointer).Detach(),false);
HRESULT hr = CallToManagedWorld(bstrwer.GetBSTR()); // C# code CallToManagedWorld(string xml);
=======================================================
There is a memory leak in the above code for the memory allocated internally by the (_bstr_t(charPointer).Detach() code.
Can you provide any solution to this?
|
|
|
|
|
hi,
I would like to configure multiple web application in the same server. These web applications using COM components. So i go for COM+ partition . I have partitioned the Local and active directory COM+ partitions.
Then to map the COM+ partition with the IIS, i have changed some properties in the Metabase file of IIS.Then i tried to access the application i got an error message like
HTTP/1.1 New Session Failed
Please suggest me the solution and tell me the procedure to partition and map it with IIS.
Thanks.
|
|
|
|
|
Hi,
I have a client connecting to a remote server. The CoCreateInstanceEx call randomly (which is the strangest thing) fails with E_INVALIDARG. For instance, restarting the client helpds. I would suspect a memory overrun but can't find one. Would appreciate any ideas.
Thanks
COSERVERINFO tSI;
MULTI_QI mQI;
CComBSTR bstrServerName("SERVERNAME");
mQI.hr = S_OK;
mQI.pIID = &IID_IQueries2;
mQI.pItf = NULL;
tSI.dwReserved1 = 0;
tSI.dwReserved2 = 0;
tSI.pwszName = bstrServerName;
CString csUser,csDomain,csPassword;
m_pAuthId = new COAUTHIDENTITY();
m_pAuthInfo = new COAUTHINFO();
USES_CONVERSION;
m_pAuthId->User = new USHORT[wcslen(A2W("UserName"))];
wcscpy(m_pAuthId->User,A2W("UserName"));
m_pAuthId->UserLength = wcslen(m_pAuthId->User);
m_pAuthId->Domain = new USHORT[wcslen(A2W("DomainName"))];
wcscpy(m_pAuthId->Domain,A2W("DomainName"));
m_pAuthId->DomainLength = wcslen(m_pAuthId->Domain);
m_pAuthId->Password = new USHORT[wcslen(A2W("Password"))];
wcscpy(m_pAuthId->Password,A2W("Password"));
m_pAuthId->PasswordLength = wcslen(m_pAuthId->Password);
m_pAuthId->Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
m_pAuthInfo->pwszServerPrincName = NULL;
m_pAuthInfo->dwAuthnLevel = RPC_C_AUTHN_LEVEL_CONNECT;
m_pAuthInfo->dwAuthnSvc = RPC_C_AUTHN_WINNT;
m_pAuthInfo->dwAuthzSvc = RPC_C_AUTHZ_NONE;
m_pAuthInfo->dwImpersonationLevel = RPC_C_IMP_LEVEL_IMPERSONATE;
m_pAuthInfo->dwCapabilities = EOAC_NONE;
m_pAuthInfo->pAuthIdentityData = m_pAuthId;
tSI.pAuthInfo = m_pAuthInfo;
HRESULT hResult = CoCreateInstanceEx(__uuidof(MainAPI), //REFCLSID rclsid,
NULL, //IUnknown * punkOuter,
CLSCTX_REMOTE_SERVER, //DWORD dwClsCtx,
&tSI, //COSERVERINFO * pServerInfo,
1, //ULONG cmq,
&mQI //MULTI_QI * pResults
);
|
|
|
|
|
Hey all,
is there a way to determine the name of the application that instantiated a dcom server? Looking it up in the process tree is not an option because the dcom server is hosted by svchost.exe which hence is the server's parent process. Changing the interface to pass an application name parameter to the server is also not an option because the caller already exists and cannot be changed. the dcom server is written in vb6 as is the calling application.
Thanks in advance.
Regards,
Hannes
|
|
|
|
|
I'm doing some COM work in C++ and I'm finding that my COM knowledge is a bit rusty (I used to use it somewhat frequently several years ago but not that much these days). I've built a simple COM DLL, and a simple MFC app that uses the COM DLL (and both were created by the VS Wizard), and both projects compile and work, but I had to do some tweaking in order to get the app to compile, and some things that I thought would have worked, didn't, so I have several COM related questions:
1. In my Test app (where I'm calling my COM component), I had started out of with:
#import "MyComComponent.tlb"
.
.
.
CComPtr<myclass> myClass;
hr = myClass.CoCreateInstance(CLSID_MyClass);
...but I got errors saying that IMyClass, CLSID_MyClass, and IID_IMyClass were all undeclared. I thought importing the .TBL file brought those definitions in (what's going on here?). In the end, I ended up with:
//#import "MyComComponent.tlb" // not needed at all
#include "MyComComponent.h" // needed for IMyClass
#include "MyComComponent_i.c" // needed for CLSID_MyClass and IID_IMyClass
.
.
.
CComPtr<imyclass> myClass;
hr = myClass.CoCreateInstance(CLSID_MyClass);
So what's going on?
2. If I just had:
//#import "MyComComponent.tlb"
#include "MyComComponent.h"
...I got a compile error saying:
MainFrm.obj : error LNK2001: unresolved external symbol _CLSID_MyClass
MainFrm.obj : error LNK2001: unresolved external symbol _IID_IMyClass
I looked into this and several sources on the web said that it was an issue of #include <initguid.h> needing to be included before a DEFINE_GUID(......) call, but I checked and initguid.h seems to be included correctly in both the DLL (in MyComComponent.cpp there's:
#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "MyComComponent.h"
.
.
.
...and correctly in the app. In the app there's:
#include "stdafx.h"
#include <initguid.h>
#include "MyTestApp.h"
#include "MainFrm.h"
#include <atlbase.h>
#import "MyComComponent.tlb"
#include "MyComComponent.h"
So what is the correct way to include the COM component's definitions? This:
#include "MyComComponent.h"
#include "MyComComponent_i.c"
...looks odd (I don't recall seeing other COM code like this), and I thought all one had to do was add:
#import "MyComComponent.tlb"
Oh, and for the record, I am correctly linking in MyComComponent.lib.
To repro, these are the steps I did:
1. Created a COM DLL (MyComComponent) w/VS's project wizard
2. Added a Class to the DLL (IMyClass)
3. Added a method to the class
4. Built the DLL
5. Created a MFC application w/VS's project wizard
6. Added MyComComponent.lib to the link step
7. Added code to call my COM component
8. Built (or try to build) the app.
Thanks for any help in clearing up what's going on. I have the feeling that what I'm missing is really simple but I can't see it.
Jeff
|
|
|
|
|
i hope that you will send me the test code.
my email: ekklesia77@naver.com
nice to meet u
|
|
|
|
|
1. In my Test app (where I'm calling my COM component), I had started out of with:
#import "MyComComponent.tlb" named_guids
With best wishes,
Vita
|
|
|
|
|
Thanks Vita! That was exactly what I was missing.
Jeff
|
|
|
|
|
I want to know how we will debug the COM which developed in VB 6.0 using ASP
OS Is WinXP
Any tool is availble .please let me know
Subash
|
|
|
|
|
Hi all.
I'm new in activex and im trying my first work. I put down here the code. What lack to me? its doesn't work. It's an example from internet that i'm testing it.
thanks for the patience to answer.
HTML:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
alert("i get this alert");
var obNewAXComponent = new ActiveXObject("AXComponent.AXComp");
var str = obNewAXComponent.callMe();
alert(str);//THIS ALERT NO.
</script>
</head>
<body>
<object id="obNewAXComponent" name="ActiveobNewAXComponentXObject" classid="CLSID:e6b78794-3955-4b29-a534-66add7e09fed" style="width: 6px; height: 7px"></object>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
THE DLL:
using System;
using System.Collections.Generic;
using System.Text;
namespace AXComponent
{
public interface AXTest
{
string callMe();
}
public class AxComp : AXTest
{
public string callMe()
{
return "My dog has no nose, how does it smell?";
}
}
}
|
|
|
|
|
I see NO ActiveX component in your code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|