|
Hi,
can I get help on how to block and realse the ports for Win 98 OS. From msdn i found that ipseccmd is the utility that could be used for Windows XP and Windows2000 to block/release ports. Similraly, is there any utility available for Windows 98? Or is there any other method by which I can block/relase ports for Windows 98(i.e, any registry enry that helps in blocking ports)???????
Thnx in advance
Regards
Uthra
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
Hello.... have solid, reliable code in C++ that automates Outlook. It has been around for a few years and 99.9% of my users report no problem.
However, occasionally a user reports that they get an error when CreateDispatch() is called. The code is 0x80004002 - No such interface supported.
Sometimes a repair or re-install of the Outlook installation fixes it, most times it does not, and those customers are just out of luck.
Any ideas what might be causing this problem? Of course I can't seem to duplicate it here....
Thanks!
Nicholas
|
|
|
|
|
Hello,
I'm receiving this very peculiar warning, after which my application crashes.
Warning: constructing COleException, scode = severity: SEVERITY_ERROR, facility: FACILITY_WIN32 ($800706BE).
I'm using Windows XP with SP2. The same application works fine on Windows 2000 SP4.
Googling didn't help at all... Hence posting this query here, just if anyone is aware of or has encountered this error and has some solution for the same.
Thanks,
Nirav
* Artificial intelligence is no match for natural stupidity! *
|
|
|
|
|
I think the 800706BE HRESULT code corresponds to
RPC_S_CALL_FAILED
Its defined in winerror.h
Search for this on google.. you might get something. I'll try and find some reason why its not working.
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi All,
Does anyone know of a MFC function equilivant to the OleRequestPendingTimeout function used in VB and V FoxPro? This is to prevent the "This action cannot be completed beause the 'file.doc -Micorsoft Word' program is not responding. Choose 'Switch To' and correct the problem" Message from appearing!
Thanks
|
|
|
|
|
I don't know the MFC functions, but I know that the VB which tells "This action..." uses the IMessageFilter interface.
With best wishes,
Vita
|
|
|
|
|
Hi!
I'm trying to implement a event that fires an UDT which contains another UDT. I have some doubts and questions. Here is the idl code:
typedef enum <br />
{<br />
S1_item1 = 0,<br />
}enumSample1;<br />
<br />
typedef enum <br />
{<br />
s2_item1 = 100,<br />
}enumSample2;<br />
<br />
typedef struct<br />
{<br />
BSTR m_string1;<br />
<br />
enumSample1 m_enum1;<br />
enumSample2 m_enum2;<br />
}st_NestedUDT;<br />
<br />
typedef enum<br />
{<br />
s3_item1 = -1,
s3_item2 = 0,<br />
}enumSample_3;
Q1: Is the s3_item1 ok? I read somewhere that enums are finally unsigned short.
typedef struct<br />
{<br />
enumSample_3 m_eS;<br />
<br />
}st_MainStruct
Q2: Should be the nested UDT member a VARIANT or just a st_NestedUDT member?
//------------------------------------------------------------------------
And the event is like:
[id(2), helpstring("method OnNewOrder")] HRESULT OnNewOrder(st_MainStruct stInfo);
And finally, how should I encapsulate the stInfo in order to call Invoke? My first thought was:
IRecordInfo * pRI;<br />
<br />
hr = GetRecordInfoFromGuids(LIBID_MyLibraryLib, 1, 0, 0, IID_st_Main_Struct, &pRI);<br />
if(FAILED(hr))<br />
return hr;<br />
<br />
CComVariant avarParams[1];<br />
avarParams[0].vt = VT_RECORD;<br />
avarParams[0].pvRecord = stInfo;<br />
avarParams[0].pRecInfo = pRI;<br />
<br />
CComVariant varResult;<br />
<br />
<br />
DISPPARAMS params = { avarParams, NULL, 1, 0 };<br />
hr = pConnection->Invoke(2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL);
Q3: Is that right?
Thank you in advance
Gizzo
|
|
|
|
|
Hello All,
I am new to COM world.
In COM is it possible to have a property with two parameters? For example:
GetValue(index, Value)
PutValue(index, Value)
Does COM allow this kind of definition in IDL file. What are pro and cons of this definition. If i declare a property with two paramters, how I will be able to use it in say C++?
Any one? Any idea?
Thanks in advance,
|
|
|
|
|
ckapil wrote:
In COM is it possible to have a property with two parameters?
Yes you can put it!
ckapil wrote:
Does COM allow this kind of definition in IDL file.
I am working on it,Will send you Source Code and Sample Application, if i am SuccessFul!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Good News for you!
i Successfully Created the Com Dll and Client Exe using double parameter Property!.
please send me your Email so that i send it to you!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
I am trying to update an ISequentialStream object in a RowSet in SQL Server. But am getting the following errors:
- Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
- String data, length mismatch
The "String data, length mismatch" one is troubling me. And I think it has something to do with the way I am creating the stream. This is the methodology I am trying to implement:
IStream *pIStream;
CreateStreamOnHGlobal(NULL, true, &pIStream);
pIStream->SetSize(x);
pIStream->Write(databuf, databuf_len, &byteswritten);
ISequentialStream *pISeqStream;
pIStream->QueryInterface(IID_ISequentialStream, (void **)&pISeqStream);
I am struggling with the length. As to what it should be set to. I have done a simple test to try and write a 6 character string. The size of the stream created is 6 bytes and I have set the size of the length in the bindings for the rowset to be 6. Yet I am getting a string length error on Update ...does a null terminator for the string have to be allowed for somewhere.
Any help on what I may be doing wrong here would be appreciated. Thanks.
|
|
|
|
|
If I do an GlobalAlloc and copy the data into this block of memory and pass that to the CreateStreamOnHGlobal function instead of using the IStream->Write function it works without an error.
But as far as I can tell, the size of the streams created using both methods are the same, and the memory allocated to each is the same.
|
|
|
|
|
I am trying to build a shared library (DLL) from m-File.The problem is that I need to use the graphics library.I know that I must bundle the libmwsglm.mlib library(using the command mcc) but I couldn't find how do it . Now I'm looking for a way to create a .dll (using graphics library)and after use it for example in C#.I think that somebody can help me and your help will be very useful for me.
Regards,
Marcel
|
|
|
|
|
Hi there,
I have built a COM component that makes available data from a device. The data is potentially confidential (commercially that is!), so I would like to limit the use of my component. Basically I want to only allow something else I have written to access its interfaces.
Can anyone give me an idea as to what the best solution for this is ...?
Apologies if this Q has been raised before, this is my first visit ...
Regards,
Rob.
|
|
|
|
|
Ok, I found out a way
I'll put it below in case anyon searching this place needs something similar. Thanks anyway ...
// In Server
// Define the license class - to be used by your ATL COM class
class CWrapperLicense
{
protected:
static BOOL VerifyLicenseKey(BSTR bstrKey)
{
CComBSTR inKey(bstrKey);
CComBSTR realKey(L"RobsHardcodedOneAndOnlyLicenseKey");
if (inKey == realKey)
return TRUE;
else
return FALSE;
};
static BOOL GetLicenseKey(DWORD dwReserved, BSTR* pBstrKey) {return FALSE;};
static BOOL IsLicenseValid() {return FALSE;};
};
// Add to your ATL COM class
DECLARE_CLASSFACTORY2(CWrapperLicense)
// This tells your class to implement the default interfaces for classfactory2
// These are then overridden in your CWrapperLicense
// In Client
CComPtr<IClassFactory2> spCF2;
CComPtr<IATLCOMClassDefinedInServer> spServerClass;
CoGetClassObject(CLSID_ATLCOMClassDefinedInServer,CLSCTX_INPROC_SERVER,0,IID_IClassFactory2,(void**)&spCF2);
spCF2->CreateInstanceLic(NULL,NULL,IID_IATLCOMClassDefinedInServer,L"RobsHardcodedOneAndOnlyLicenseKey",(void**) &spServerClass);
|
|
|
|
|
I've engaged in a project with the function of displaying DOC and PPT files.
It means that my program can display DOC and PPT files without displaying the menus and toolbars of the MS Office, how can I get it done.
I searched a lot of documents about the Office Automation,but I found none suitable for me.
Thanks for you help!
|
|
|
|
|
I gave you some feedback in the C++ forum.
"Live long and prosper." - Spock
|
|
|
|
|
Hi figer,
In COM terminology DOC and PPT files are called as Active Documents
By my personal experence you must start reading about Active Document, Active Document Server, Active Document Containers etc.
Okay so you want to display the DOC, PPT etc files inside your appication...
For this purpose your application must be an Active Document Container...
For more information search the microsoft KB articles named "DSOFramer"
I have strong felling, this is what you wanted...
And about Office Automation. If the above concepts are clear then I dont think Office Automation is an issue....
Have fun buddy !
Happy programming
Cheers,
Vishal
|
|
|
|
|
I need some help in codding ActiveX container. Short description : Microsoft Visual Studio 2003 and other vsersion (6,7) , includes sample TstCon - a sample of ActiveX Container. When I place control and than delete it or open new document, this program hang up every time when i close it.
I modified ContainerItem method OnDelete()... after pItem->Delete() i put delete(pItem); its all works under win2k... but... in 98SE,XP after deleting control, when i try to insert new control an error occured "Failed to connect.Link may be broken".
So does any one knows how to solve this, and force it to work correctly.
Thanks.
|
|
|
|
|
Hi,
I am new to COM.I have one application(Say simulator) which is interacting with control software on the same machine.Now i want to it to work through remote machine.Can you please let me know how this functionality can be achieve.If you know similar url please let me know.
Thanks
|
|
|
|
|
Assuming you are not using smart pointers, the code will go as follows:
{
COSERVERINFO csi = {0};
MULTI_QI qi[1] = {0};
//Init pwszname to computer name of remote server where
ur COM server
//is to be deployed
csi.pwszName = L"xxxx"; //use proper comp name here
qi[0].pIID = &IID_IFoo; //Init to interface you wish to obtain
HRESULT hr=CoCreateInstanceEx(CLSID_Foo,NULL,CLSCTX_REMOTE_SERVER,&csi,1,qi);
if(SUCCEEDED(hr))
{
m_pFoo=(IFoo*)qi[0].pItf;
//you got the interface for remote machine.
//Do your work here
}
}
This method is to programatically set up the connection to remote server
Another easy method is to register your COM server on both the local and remote machine. Launch 'dcomcnfg' on the maching you plan to run client. Find your COM server from the objects in the list view, right click and click 'properties'. Check the box 'Run this component on' and key in the name of the remote machine you paln to install your COM server.
That should work fine. No significant changes are required to the basic functionality of the COM server and the migration to DCOM server should be breeze
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
Hi all,
I've got a problem- I'm attempting to write an unmanaged c++ COM client for
a c# COM server. I wrote an event sink to handle events dispatched from the server. The problem- Events are properly intercepted by the client when in "blocking mode" but does not seem to work when in "non-blocking mode", i.e: When I implement the logic in a seperate thread.
I'v read about it some and I think this is because the thread enters a new apartment which the client sink is not in or something of that sort. How do I
overcome this problem?
Thanks in advance and sorry for by *bad* english..
i.chen
|
|
|
|
|
attention
|
|
|
|
|
pWebBrowser2->get_Document(&pDisp);
IHTMLDocument2Ptr pHTMLDoc2(pDisp);
IHTMLElementCollectionPtr pHTMLColl;
pHTMLDoc2->get_all(&pHTMLColl);
pHTMLColl->tags(_variant_t(TEXT("a")), &pDisp);
pHTMLAColl=pDisp;
The problem here:
pHTMLColl->tags(_variant_t(TEXT("a")), &pDisp);
On C++ works well, but on MASM returned:
DISP_E_MEMBERNOTFOUND
|
|
|
|
|