|
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.
|
|
|
|
|
|
somebody who read the book neame "Inside COM"?in this book,the chapt 10(the server of the EXE) i have many problems, that i couldn't known what should i do to build a complete project which can work well.What the steps of the work?i'm eager for hands?
someone known mastered COM would tell me.
what mean makefile?(there he tell me the makefile can buld some certain files!)
Thanks
|
|
|
|
|
Try using google before posting here, finding out what a makefile is will take a second or two, less than the time it took you to ask this question.
Also, I am not having a go at your level of English but can you rephrase your question as it is difficult to understand what you mean.
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
We used AJAX to call a page by passing some parameters through querystring. Based on the parameters, the page will perform some operations. IE always caches the files and when the same page is called with some other parameters, sometimes IE takes the cached page with old parameters and because of our validations, it says that duplicate not allowed. Is there a way to force IE to always get the file from the server and not from Cache
|
|
|
|
|
I have a 3rd party COM application that I use to retrieve 3d map information over the web. All the methods work fine accept one method. That method (SaveRenderToFile) saves a render of the present image to a file on the computer. Occasionally (about 1 in every hundred calls) it will lock the application and sometimes kill it.
I don’t know how to prevent this from happening. I NEED the image rendered. I think I’m screwed and I’ll have to hope that the company fixes its method.
Here is my code…
/*
* Function: SaveImageToFile
* Save the RenderToAFile
* Returns: path to the saved image if successful.
*/
BSTR CTE3DWindow::SaveImageToFile()
{
ISnapShot2Ptr pISnapShot2;
BSTR image = L"no image";
long iPicQual = -1;
char szBuffer[256];
CoInitialize(NULL);
pITE5.QueryInterface(IID_ISnapShot2, (ISnapShot2**)&pISnapShot2);
pISnapShot2->PutRenderQuality(0);
sprintf(szBuffer, "CTE3DWindow::SaveImageToFile entering try->SaveRenderToFile");
LogDebugInfo(szBuffer);
try
{
image = pISnapShot2->SaveRenderToFile();
}
catch(_com_error const &e)
{
sprintf(szBuffer, "CTE3DWindow::SaveImageToFile failed was ");
strcat(szBuffer, (char*)e.Description());
LogDebugInfo(szBuffer);
return image= L"no image";
}
sprintf(szBuffer, "CTE3DWindow::SaveImageToFile Completed SaveRenderToFile, image is ");
strcat(szBuffer, (char*)image);
LogDebugInfo(szBuffer);
CoUninitialize();
return image;
}//END SaveImageToFile
Thanks
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
The following is a serious error:
BSTR image = L"no image";
A BSTR is not just a wide string. First it's prefixed with a length and the length is ***BEFORE*** the position the pointer points. Secondly a specific allocator is assumed. To fix this error make the following change:
BSTR image = SysAllocString(L"no image");
You also should add a call to SysFreeString to free the string when it's no longer needed. An understanding of BSTR s is essential if you're going to use COM in C/C++ without any wrappers (and probably even if you are).
The calls to CoInitialize and CoUninitialize also worry me. Although this need not be a mistake (I'd have to see more code) the normal pattern is to initialise COM once when the app starts and uninitialise it once when the app exits. You should not uninitialise COM while COM objects still exist -- that's what it look like you may be doing.
Steve
|
|
|
|
|
Thank You EVERY MUCH for the feedback it may not have solved my problem but I'm sure it will help my application to be better.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi all,
I wrote a very simple user control in C#, and I'm trying to access it from my C++/MFC code. The control contains a single label in it. Here's the control code itself:
namespace HelloCom {
[Guid("F0AE1BB2-A840-4341-B785-D8A54C81E643")]
public interface HelloCom {
}
[Guid("111DCC11-900D-431c-B3A0-4B95C539A47D")]
public partial class HelloComImpl : UserControl, HelloCom {
public HelloComImpl() {
InitializeComponent();
}
}
}
Here's what I've done so far:
* Signed my control with a strong key
* Clicked the "expose assembly to COM interop" and "make visible to COM" options
* regasm HelloCom.dll /tlb:HelloCom.tlb
* gacutil -i HelloCom.dll
However, despite all this, I still cannot see my control in the Toolbox on the C++ side, nor can I insert it via the "Insert ActiveX Control" menu option. What am I doing wrong ?
|
|
|
|
|
hi all,
how to access a COM component developed in vc++6.0 from ASP.net?
what r the issues need to be considered in this case??
Thanks in advance.
Prashanth.v
|
|
|
|
|
I'm not sure, but it would be VB way. You need to add reference to that component in your project and use it in like VB.
|
|
|
|
|
I created a .NET class libray, and I use it in a Win32 Console app.
It works fine, but the smart pointer Release() method, don't call the .NET class destructor? What did I wrong?
Win32:
#import "p1.tlb"
void f()
{
p1::IClass1Ptr p("My1.Class1");
p->Show();
}
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(NULL);
f();
return 0;
}
.NET class lib:
[ComVisible(true)]
[GuidAttribute("3DAF8E7A-ACD0-4bd9-B275-04F4F802948B")]
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsDual)]
public interface class IClass1
{
void Show();
};
[ComVisible(true)]
[ProgIdAttribute("My1.Class1")]
[GuidAttribute("BA9367CA-6707-4060-A42C-34D2A3DEBC05")]
[ClassInterfaceAttribute(ClassInterfaceType::None)]
public ref class Class1 : IClass1
{
public:
virtual void Show()
{
MessageBox::Show(m_str);
}
public:
Class1()
{
m_str = gcnew String("Class1()");
}
~Class1()
{
if(m_str) delete m_str;
this->!Class1();
}
!Class1()
{
}
private:
String^ m_str;
};
whole source:
http://bmfnik.hu/szokeimre/prog/com_ptr.ZIP
|
|
|
|
|
I developed a COM add-in for Outlook 2003 with Visual Studio 2005.
I added an msoControlPopup to the menu bar of Outlook and then added an msoControlButton to the popup. The button would then initialize a Windows.Forms.Form object.
However, each time I start outlook, I can only run the add-in for once. After I close the Form, the button gave no response at all if I click it.
Some of the codes in Connect.cs are as follows:
public class Connect : Object, Extensibility.IDTExtensibility2
{
CommandBar menuBar;
CommandBarControl commandBarControl_CM;
public Connect()
{
}
public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode, ref System.Array custom)
{
}
public void OnAddInsUpdate(ref System.Array custom)
{
}
public void OnStartupComplete(ref System.Array custom)
{
//applicationObject = (Outlook.Application)applicationObject;
//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 = "Calendar Management";
//Add button(s) to the newly created control
CommandBarPopup commandBarPopup_CM = (CommandBarPopup)commandBarControl_CM;
CommandBarControl commandBarControl_SI = commandBarPopup_CM.Controls.Add(
MsoControlType.msoControlButton, 1, "", 1, true);
commandBarControl_SI.Visible = true;
commandBarControl_SI.Caption = "Show Info";
//Add button event handler(s)
CommandBarButton button_showinfo = (CommandBarButton)commandBarControl_SI;
button_showinfo.Click += new _CommandBarButtonEvents_ClickEventHandler(button_showinfo_Click);
}
public void OnBeginShutdown(ref System.Array custom)
{
}
private void button_showinfo_Click(CommandBarButton Ctrl, ref Boolean CancelDefault)
{
System.Windows.Forms.Form form_CalMng = new Form_CalMng();
form_CalMng.Show();
}
private object applicationObject;
private object addInInstance;
}
|
|
|
|
|
Somebody help me, please......
|
|
|
|
|
Hi
Question 1:
When we create an COM object in a Process where does the memory of the COM objects get allocation?
Question 2:
Does the memory allocated to the COM object contributed to increase in Virtual memory of the process where it is instantiated.?
Question 3:
What is the relation between virtual memory of a process and private bytes of the process?
for Ilanthendral(KillerInstincts)
|
|
|
|
|
R.ilan thendral wrote: Question 1:
When we create an COM object in a Process where does the memory of the COM objects get allocation?
Wherever the code that implements the class factory allocates it. Typically this will be on one of the heaps but sometimes a small number of static objects are used.
Question 2:
Does the memory allocated to the COM object contributed to increase in Virtual memory of the process where it is instantiated.?
Potentially. The heap manager manages a large block of virtual address space for each heap, so sometimes allocating from the heap can be satisfied from the existing virtual address space allocated to the heap, and sometimes the heap has to grow to satisfy the new allocation.
Question 3:
What is the relation between virtual memory of a process and private bytes of the process?
It's hard to do justice to that question in a small amount of space. The virtual address space is how the process views memory; at any time, most of the virtual address space isn't backed by anything - if you try to write to or read from them, you just get an access violation. Virtual addresses can be mapped to memory-mapped files, shared memory sections, can be marked as reserved, or can point to memory that can only be accessed by this process - these are 'private bytes'.
Task Manager confuses everything by referring to 'private bytes' as 'VM Size'.
In turn, only some of the process's virtual addresses are actually in physical memory at any given time. The working set ('Mem Usage' in Task Manager) is the set of pages belonging to the process (memory-mapped files, shared, or private) which are currently in physical memory. The processor and operating system work together to give the illusion that the code and/or data are all accessible; if the process references (reads from or writes to) a page not currently in physical memory, the processor raises a page fault exception, which the OS handles by reading the page from disk, then setting a data structure (the page table entry) to point to the physical memory containing that page.
|
|
|
|
|
Hello all,
I have a COM component on a remote server with no DllSurrogate = "" value set in the remote registry.
So, the instantion could not be done in the server side only.
I made a method to access the remote registry primitives, using the pipe \\PIPE\winreg and also using the rpc.rcacn_np transport. So, this way I'm able to modifying the registry remotely, putting the DllSurrogate="" and performing the COM instantiation.
Everything is working fine, but now I must do all of this without file and print sharing, which means that I'll not be able to use the PIPE anymore. So I'm looking for some COM with DllSurrogate="" already enabled that expose some function to modify my component. Or some service working at port 135 or 445 with some exposed methods to do the same thing, this way I can access using the rpc.rcacn_ip_tcp.
So, any ideas. Thanks in advance.
Raphael Amorim Dantas Leite
|
|
|
|
|