Click here to Skip to main content
15,908,931 members
Home / Discussions / COM
   

COM

 
AnswerRe: Error - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
«_Superman_»16-Feb-09 23:08
professional«_Superman_»16-Feb-09 23:08 
GeneralRe: Error - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
pandit8416-Feb-09 23:27
pandit8416-Feb-09 23:27 
AnswerRe: Error - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
frx9617-Feb-09 14:13
frx9617-Feb-09 14:13 
QuestionInterfacing with Excel Manager application Pin
Aladin10116-Feb-09 6:35
Aladin10116-Feb-09 6:35 
QuestionSharing variable between instances of COM object? Pin
Mike the Red16-Feb-09 1:43
Mike the Red16-Feb-09 1:43 
AnswerRe: Sharing variable between instances of COM object? Pin
frx9616-Feb-09 17:44
frx9616-Feb-09 17:44 
GeneralRe: Sharing variable between instances of COM object? Pin
Mike the Red16-Feb-09 23:17
Mike the Red16-Feb-09 23:17 
QuestionAddin a port to firewall's exception list. Pin
ShyamR15-Feb-09 23:58
ShyamR15-Feb-09 23:58 
Hello All,
I am trying to add a port to the windows firewall's exception list.
And I am using the INetFwProfile, INetFwOpenPort and INetFwOpenPorts COM interfaces for the purpose.

My problem is that all the required method calls on the interfaces are succeding
but without any effect, i.e. I can't see the ports in the exception list.

I am using following code sequence.
// Retrieve the collection of globally open ports.
hr = fwProfile->get_GloballyOpenPorts(&fwOpenPorts);
if (FAILED(hr))
{
printf("get_GloballyOpenPorts failed: 0x%08lx\n", hr);
goto error;
}

// Create an instance of an open port.
hr = CoCreateInstance(
__uuidof(NetFwOpenPort),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(INetFwOpenPort),
(void**)&fwOpenPort
);
if (FAILED(hr))
{
printf("CoCreateInstance failed: 0x%08lx\n", hr);
goto error;
}

// Set the port number.
hr = fwOpenPort->put_Port(portNumber);
if (FAILED(hr))
{
printf("put_Port failed: 0x%08lx\n", hr);
goto error;
}

// Set the IP protocol.
hr = fwOpenPort->put_Protocol(ipProtocol);
if (FAILED(hr))
{
printf("put_Protocol failed: 0x%08lx\n", hr);
goto error;
}

// Allocate a BSTR for the friendly name of the port.
fwBstrName = SysAllocString(name);
if (SysStringLen(fwBstrName) == 0)
{
hr = E_OUTOFMEMORY;
printf("SysAllocString failed: 0x%08lx\n", hr);
goto error;
}

// Set the friendly name of the port.
hr = fwOpenPort->put_Name(fwBstrName);
if (FAILED(hr))
{
printf("put_Name failed: 0x%08lx\n", hr);
goto error;
}

// Opens the port and adds it to the collection.
hr = fwOpenPorts->Add(fwOpenPort);
if (FAILED(hr))
{
printf("Add failed: 0x%08lx\n", hr);
goto error;
}


Please help me out...
Questioncalling COM using CreateObject ( late bind ) Pin
vineeshV15-Feb-09 23:22
vineeshV15-Feb-09 23:22 
AnswerRe: calling COM using CreateObject ( late bind ) Pin
Mike the Red16-Feb-09 3:32
Mike the Red16-Feb-09 3:32 
Question[HELP]Problems with Kodak scanner Pin
Palermo4ever15-Feb-09 22:17
Palermo4ever15-Feb-09 22:17 
QuestionHow do I un register and re register dlls in COM+ - need help Pin
Slow Learner14-Feb-09 12:15
Slow Learner14-Feb-09 12:15 
AnswerRe: How do I un register and re register dlls in COM+ - need help Pin
Slow Learner14-Feb-09 12:31
Slow Learner14-Feb-09 12:31 
GeneralRe: How do I un register and re register dlls in COM+ - need help Pin
Mike the Red16-Feb-09 3:52
Mike the Red16-Feb-09 3:52 
Questionparse object array into string.... Pin
vijay.victory11-Feb-09 20:29
vijay.victory11-Feb-09 20:29 
AnswerRe: parse object array into string.... Pin
Mike the Red16-Feb-09 6:26
Mike the Red16-Feb-09 6:26 
AnswerRe: parse object array into string.... Pin
frx9616-Feb-09 18:25
frx9616-Feb-09 18:25 
QuestionNeed help asap on serial port Pin
rj_21_200311-Feb-09 4:08
rj_21_200311-Feb-09 4:08 
AnswerRe: Need help asap on serial port Pin
Roger Stoltz11-Feb-09 22:27
Roger Stoltz11-Feb-09 22:27 
QuestionNeed some help regarding Outlook Addin Pin
wasimsharp10-Feb-09 19:10
wasimsharp10-Feb-09 19:10 
QuestionProblem with COM DLL---- Firing event in thread Pin
chetanjoshi910-Feb-09 18:34
chetanjoshi910-Feb-09 18:34 
AnswerRe: Problem with COM DLL---- Firing event in thread Pin
Roger Stoltz11-Feb-09 22:22
Roger Stoltz11-Feb-09 22:22 
QuestionBHO can set the certificate for SSL Login? Pin
maoxintt10-Feb-09 15:48
maoxintt10-Feb-09 15:48 
Generalneeds to write a program with MATLAB using Simulated annealing technique Pin
awoyale10-Feb-09 2:25
awoyale10-Feb-09 2:25 
QuestionSystem.__ComObject - how to check null Pin
coolestCoder5-Feb-09 7:13
coolestCoder5-Feb-09 7:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.