|
|
hi
what iam tring to do is iam trying to create tool that closely resembles the working of DbgView .
The way the DbgView tool works is:
You can launch the tool on the system.
OutputDebugString() is a Win32 API. If you use that API in your program, the output will then be shown on DbgView.
SO using this functionality i want to use OutputDebugString() in my client applications and i want the output(string in OutputDebugString()) to be shown in servers GUI.
CAn u suggest me how to proceed.
Thanks in Advance
abhi
|
|
|
|
|
Hi!
we have the following situation:
an old MFC-app (built with VC++6.0) loads a regular MFC Dll (built with
VC++.NET), which loads several MFC extension Dlls (built with
VC++.NET).
one of the extension Dlls creates a frame-window,
another one uses a CHtmlView within a docking pane.
we dont use the document/view architecture.
we dont have sources for the old MFC-app, just a Dll-interface.
when I shutdown the app, it takes more than 1 minute till the CHtmlView
object gets destroyed. during this time our app is frozen.
I figured out, that it is the call m_pObject->SetClientSite(NULL)
within the COleControLSite dtor, which is lasting that long.
when we load the extension-Dlls from within an new MFC-app (built with
VC++.NET), everything works fine.
any help on how to solve this would be greatly appreciated,
thanx in advance!
regards,
Hans
|
|
|
|
|
HI all
I have an application which uses a Filetransfer module (.tli file is involved while i debug) .
And a function raw_SendFile fails with return value of 0x80004005 (E_FAIL) when it tries to send a file.
To give more info : This function is called N times to send N files , and it properly sends say 10 files . And exacltly when it sends the 11th file named ramdisk\rd.gz it fails . And everytime this is reproducible and exacltly at this file , this function fails .
And my search in MSDN about E_FAIL says "Unspecified error" . What is this unspecified error ?
How can I solve it ?
Can anyone please help me ????
redindian
|
|
|
|
|
More information is needed - There is literally 1000s of reasons a COM object could return E_FAIL .
Steve
|
|
|
|
|
Hi Steve
Well I would like to add more points to you .
The files are taken from a delivery folder in a server, say A .
The application that tries to send these files are in system , say B.
And the destination is also a server ,say C, in a remote location , to which B connects via modem direct .
So when B tries to send the files from A to C this error occurs .
Folder in A <--- Files fetched by B ---> System B <-----Sending to C----> server C
And one interesting thing is that C is a linux call server which is called a PABX in telecom .
Could you please help me with your analysis ?
My doubt is - Why should the sending of a particular file result in error ? Why not other files ?
Thanks in advance
redindian
|
|
|
|
|
What is need is some code from around the failed call. What COm object is beging called? What method on what interface?
Steve
|
|
|
|
|
Steve
I am pastig the relevant lines from related files ...
from file filetransfer.tlh
***************************
// x:\pm5\db_serve\release\FileTransfer.tlh
// C++ source equivalent of Win32 type library ..\dlls\FileTransfer\FileTransfer.tlb
// compiler-generated file created 03/08/06 at 12:55:05 - DO NOT EDIT!
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
struct __declspec(uuid("afb6da80-53ad-11d3-9771-00600835af91"))
/* dual interface */ IFileTransfer;
_COM_SMARTPTR_TYPEDEF(IFileTransfer, __uuidof(IFileTransfer));
struct __declspec(uuid("afb6da80-53ad-11d3-9771-00600835af91"))
IFileTransfer : IDispatch
{
// Raw methods provided by interface
virtual HRESULT __stdcall raw_ReceiveFile (
BSTR bstrFileName,
BSTR bstrRemoteDirName ) = 0;
};
from file filetranfer.tli
**************************
// Wrapper implementations for Win32 type library ..\dlls\FileTransfer\FileTransfer.tlb
// compiler-generated file created 12/21/05 at 13:41:49 - DO NOT EDIT!
#pragma once
// dispinterface _IFileTransferEvents wrapper method implementations
inline HRESULT IFileTransfer::SendFile ( _bstr_t bstrFileName, _bstr_t bstrRemoteDirName ) {
HRESULT _hr = raw_SendFile(bstrFileName, bstrRemoteDirName);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
redindian
|
|
|
|
|
Sorry steve
missed the line
replace #include
with
#include <comdef.h>
redindian
|
|
|
|
|
seems to be some problem in pasting here ...
it is condef.h file
redindian
|
|
|
|
|
Hello,
I'm a fairly new to COM and web services, but am capable in C#. I've written test applications to consume some web services I've set up, but now I am to the meat of what I am writing...
I need to create a c# COM assembly (.dll) that a win32 program can use to access web services. The problem is, when I start a C# DLL project, it complains "[C# Error] Class.cs(9): The type or namespace name 'Services' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference?)" when I try to add "using System.Web.Services;" as I did in the Win32 APP.
Is there a different resource to use for COM?
I'm sure I'm just missing something stupid, but I can't for the life of me figure it out...
|
|
|
|
|
i have captured video from webcam and displayed in mfc.
i like to display the same in internet explore.
how to do it?
thanks in advance!!!!!!!!!
JAYARAJ
|
|
|
|
|
If you have an avi-file you can simply put it in an html file via the object-tag like:
<object id="xyvideo" width="320" height="240" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Media Player" type="application/x-oleobject">
<param name="width" value="320" />
<param name="height" value="240" />
<param name="FileName" value="xyvideo.avi" />
<param name="ShowControls" value="TRUE" />
<param name="AutoStart" value="FALSE" />
Regards,
Juergen
|
|
|
|
|
The above answer is very much correct if you have an avi file etc already saved somewhere.
Maybe you want to show the live video from the webcam in IE.
For that, you could do the following: (VC6)
1- Create a new ATL/COM project using Appwizard.
2- Insert New ATL Object->Controls->Composite Control.
3- Now you have a dialog, on which you can place controls, write code behind it, etc.
Hope that helps.
this is this.
|
|
|
|
|
Hai khan++
Thanks a lot for your help
I will try it
JAYARAJ
|
|
|
|
|
Hi,
I want to make a call to IDispatch GetIDsofNames and IDispatch Invoke from one COM exe to another COM exe (in which the implementaion of these two methods is being done). The second COM exe is an automation wrapper. In doing so I want to pass an argument (BSTR) to IDispatch GetIDsOfNames and Invoke from the caller exe so that i can preserve my thread pool design. e.g I need to do the following
STDMETHOD (GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames,LCID lcid,DISPID* rgdispid, BSTR sessionID );
STDMETHOD ( Invoke )( DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispparams, VARIANT* pVarResult, EXCEPINFO* pExcepinfo,
UINT* puArgErr, BSTR sessionID);
Can some body tell me the exact signature to be used in my IDL for GetIDsOf Name and Invoke.
|
|
|
|
|
IDisptach is a starndard COM interface.
Some quick thoughts -
1. You can inherit your own dispatch interface from IDispatch and implement this interface instead
2. Add a property "SessionID" to this new IDispatch dervide interface
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
hello guys,
I am having a VB6 COM FTP application that is being called by some VBScript. It works perfectly fine in Windows based ftp server. However, one of the client is trying to use it in IBM Mainframe box (don't know the version yet) but it doesn't work. connection to mainframe occurs ok however when trying to put the file to mainframe it doesn't work.
The vb6 code is as below: In an ideal windows ftp environment I call it as:
myFTP.PutRemoteFile("c:\test.txt", "", "/MyFTPFoder") and it works fine.
However, the client has some funny naming convension of their mainframe file system. eg RemoteFolder is as F1.Test.ASL.Mne.FTS (they call it dataset)etc.
my questions are:
Is it a valid naming convension for the mainframe eg F1.Test.ASL.Mne.FTS?? or it needs to be mapped to a physical drive?
Is there any reason the ftp shouldn't work in mainframe while working in windows?
Thx
Public Function PutRemoteFile(LocalFilename, RemoteFilename, RemoteFolder) As Boolean
On Error GoTo handler
Dim bRet As Boolean
PutRemoteFile = False
LocalFilename = Trim$(LocalFilename)
RemoteFilename = Trim$(RemoteFilename)
RemoteFolder = CStr(Trim(RemoteFolder))
''''set the directory as per user's input and check if there is no error. If error returns false.
If FtpSetCurrentDirectory(hConnection, RemoteFolder) = False Then
Err.Raise vbObjectError, TypeName(Me), "Directory doesn't exist in Remote folder : " & ExtendedError(Err.LastDllError)
PutRemoteFile = False
Exit Function
End If
'Is the local file set?
If LocalFilename = "" Then
Err.Raise vbObjectError, TypeName(Me), "LocalFilename is blank - it must refer to a valid local file"
End If
'Does the local file actually exist?
If (Not FS.FileExists(LocalFilename)) Then
Err.Raise vbObjectError, TypeName(Me), "LocalFilename '" & LocalFilename & "' does not exist or the user context does not have read-access"
End If
'Are we connected?
If (Not Me.FTPServerIsOpen) Then
Err.Raise vbObjectError, TypeName(Me), "Must call OpenFTPServer first"
End If
'If it ends in \ then we assume the caller wants to use the same filename as the RemoteFilename
RemoteFilename = Trim$(RemoteFilename)
'''If remote file name doesn't exist assuming it will be same as local!
If RemoteFilename = "" Then
RemoteFilename = FS.GetFileName(LocalFilename)
End If
'Some/most ftp servers prefer / so play it safe and convert all \ to /
RemoteFilename = Replace(RemoteFilename, "\", "/")
If (Right$(RemoteFilename, 1) = "/") Then
RemoteFilename = RemoteFilename & FS.GetFileName(RemoteFilename)
End If
'Put it on the server
bRet = FtpPutFile(hConnection, LocalFilename, RemoteFilename, dwType, 0)
'Could be problems with write-access on the server, or whatever
If bRet = False Then
Err.Raise vbObjectError, TypeName(Me), "PutRemoteFile failed : " & ExtendedError(Err.LastDllError)
End If
PutRemoteFile = True
Exit Function
handler:
DealWithError Err
End Function
|
|
|
|
|
Hi,
I have an MFC based Document-View-Application with a CHTMLView hosting a IWebBrowser-Control. Futhermore I implemented an Event Sink based on a CCmdTarget to listen to MouseMove-Events (HTMLDocumentEvent) within the Browser-Control. This works fine for websites not working with frames. When I work with frames I only get connected to the frame-document itself.
Any help is truly appreceated.
Juergen
|
|
|
|
|
I am new to COM. I am developing an application using COM. I got the error as: error LNK2001: unresolved external symbol _CLSID_WMRMKeys. What I know is that the com object is from a DLL, and I registered the DLL by running regsvr32 *.dll, and the registration is successful. Thanks for your help.
|
|
|
|
|
I presume you have included the header file for the dll in your application and everything looks fine until you link. I would recommend if you are new to com that you use the #import directive to access the dll's functionality (see MSDN) for more information.
The alternative would be to use include the yourdllsname_i_.c stub file in your project. Turning off precompiled headers on that file otherwise you'll get a weird "stdafx" not found error.
Using #import would be easier but ...
Regards
Ray
"Je Suis Mort De Rire"
Blogging @ Keratoconus Watch
|
|
|
|
|
Hi Forum!
this is Shatrughan Mishra. I am thankfull to
you all as many like me would have been for the articles posted by you on
codeproject.com.
I have been trying to add two addins to the MS word 2000 and XP. Both
are working fine independently. But, the problem is when I try to add
both of them the one is overridden by the other and both produce the
same result. I also would like to learn about the mystery of ".dot".
Please guide me and help me solve my problem. If you charge anything for
this, I would be glad to pay for it.
Thanx in advance!
Regards!
Shatrughan.
Shatrughan Mishra
|
|
|
|
|
Are the two add-ins using the same original code? I mean, did you create one project and made two copies, and changed the code in both the copies to create two add-ins?
If you did the above, then it will not work, as the GUID is the same for both. Then you should create new GUIDs using the GUIDGen.exe utility, and use them in at least one of the projects, so that they do not conflict.
And about the ".dot" stuff, sorry, I have never worked with that.
this is this.
|
|
|
|
|
When we create distribution list of contacts in Outlook, it displays small icon at the top right corner of header (address card view) . I need to add such icon to simple contacts in address card view. It's possible to do, plaxo (www.plaxo.com) does this, but I unable t find any docummented or non-docummented issues for it. Can you help me?
|
|
|
|
|
hi all
i had make drawing on the dilaogs. now i want that these drawing should be saved in bmp file or the jpeg file tell me how to do that or any other place such as picturebox or any other COM component where i can draw ans save as bmp file.
ddd
|
|
|
|