Similar Threads:
1.Creating Com Interop Wrapper Manually
2.Problems creating COM wrapper for C# dll (regasm.exe)
I called regasm.exe /tlb CameraManagement.dll and I got
CameraManagement.tlb
When I look inside with OleView.exe or create C++ header I see
something like that:
struct __declspec(uuid("37944845-f74f-3999-b972-d42355a78bcd"))
_AlarmSetting : IDispatch
{};
struct __declspec(uuid("5e6abb0e-b170-377d-9902-20bb5388a53c"))
_AlarmSetting2 : IDispatch
{};
struct __declspec(uuid("8969367c-f590-333c-994e-c0b2a37ce928"))
_Camera : IDispatch
{};
they're just empty interfaces, only enums are exported correctly - but
oryginal C# classes have plenty of methods ! Where have they gone ? Am
I missing something ?
Thanks in advance
Kamil
3.creating a C# object from ASPv3 using Interop - problem
Hi,
I'm encountering a problem while trying to create a C#
object from ASP v3.
The C# class is derived from ServicedComponent, has a
strong name key and is registered into the GAC using
regsvcs.exe .
ASP is running under the SYSTEM account, and that account
has full control permissions to the folder where my C#
assembly file is located.
The error message I am receiving is:
Server.CreateObject failed while checking permission.
Access is denied to this object.
Any help would be appreciated!
Thanks,
Itamar
4.Problems manually creating a CHeaderCtrl in a custom control (derived from CWnd)
Hi, i'm trying to write a custom ListCtrl syle control with an integrated
CHeaderCtrl but i'm running into some initialisation problems. My control
is derived from CWnd like this:
class CScrollCtrl : public CWnd
{
private:
CHeaderCtrl m_HeaderCtrl;
...
};
then i initialise the header-control like this:
CScrollCtrl::PreSubclassWindow()
{
CWnd::PresubclassWindow();
...
m_HeaderCtrl.Create(...., this, .....);
....
}
I'm testing this control in a dialog-based test application with one
instance created by placing a custom-control in the MFC dialog editor and
everything was going fine until I tried to create a second instance by
"manually" adding a CScrollCtrl member variable to the parent dialog and
calling the CScrollCtrl::Create() method from the OnInitDialog() method of
the parent dialog.
When i try to create the second instance MFC throws an ASSERT on some code
trying to "attach" something to something else (or something =) I've looked
around for some sample code but I haven't found anything where someone is
actually creating their own CHeaderCtrl instance in a custom control it's
all just subclassing examples so far.
Any Ideas?
Karl.
5.Problem creating "manually" a MDI with its view
Hi all...
I programmed an MDI application using document-view architecture. All works
fine when I add the frame, the view and the document using CMultiDocTemplate
in InitInstance method.
One of the functionalities the program has is the search for certain
information. Since the search is only for displaying data without the
functionality to save the document, I tried to create the MDI frame and view
without the corresponding document.
This is the code:
void CMainFrame::OnBizFind()
{
CBusquedaDlg dlg;
dlg.SetDatabase(((CGamaApp *)AfxGetApp())->GetDatabase());
if( dlg.DoModal() == IDOK )
{
CRuntimeClass* pFrameClass = RUNTIME_CLASS(CBusquedaFrame);
CMDIChildWnd *pWnd = (CMDIChildWnd *)pFrameClass->CreateObject();
if( pWnd )
{
CCreateContext ctx;
ctx.m_pCurrentDoc = NULL;
ctx.m_pCurrentFrame = NULL;
ctx.m_pLastView = NULL;
ctx.m_pNewDocTemplate = NULL;
ctx.m_pNewViewClass = RUNTIME_CLASS(CBusquedaView);
CString sTitle;
sTitle.Format(_T("Resultados de bqueda - %s"),
COleDateTime::GetCurrentTime().Format(_T("%d/%m/%Y %H:%M:%S")));
pWnd->Create(NULL, sTitle,
WS_OVERLAPPEDWINDOW|WS_CHILD|WS_VISIBLE|WS_MAXIMIZE, rectDefault,
this, &ctx);
dlg.Populate((CBusquedaView *)pWnd->GetActiveView());
}
}
}
CBusquedaDlg is a modal dialog to ask for the filter to the search.
CBusquedaFrame and CBusquedaView (derived from CView) are the frame and the
view, respectively.
That works, but sometimes an extrange behaviour occurs. The "x" at the top
right corner of the frame, and the minimize and maximize buttons disappear,
not allowing to maximize, minimize or close the frame. What may be
happening?
Can I use CMultiDocTemplate without specifying a document so that all that
management is done automatically by the MFC framework? Maybe the code I'm
suing to create the frame is incorrect or I missed something
Thanks in advance
Jaime
6. Problems registering C# COM object manually
7. Creating an unmanaged wrapper to C# Library
8. Creating aspx.cs file manually