|
If that DLL is ATL COM then
with the help of #import directive you can get its methods by creating the instance of the DLL.
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
hi
I would like to get the list of all available domains on a computer in VC++(either MFC or Win32).
which API do i need to use??
thanx in advance
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 6:50 Monday 8th May, 2006
|
|
|
|
|
For finding the domains you have to use :
NETRESOURCE structure and API's such as:
WNetOpenEnum()
WNetEnumResource()
Cheers
"Peace of mind through Technology"
|
|
|
|
|
<br />
class MyClass{<br />
int N;<br />
int M;<br />
MyClass(){<br />
N=0;
M=0;<br />
}<br />
MyClass(int n){<br />
N=n;
}<br />
...<br />
}<br />
<br />
....<br />
<br />
<br />
MyClass X, Y(3);<br />
In debug mode I saw that in both cases (X and Y(3)) the object is created throw the default constructur (N=0), and after that (only in the Y case) there is a call of the other constructor(N=3).
Is this a standard behaviour of C?
So can I put the default initializations ONLY in the first constructor and be SURE that using other constructor I have always an INITIALIZED object(see the variable M)?
Thanks for your time.
|
|
|
|
|
_Russell_ wrote: In debug mode I saw that in both cases (X and Y(3)) the object is created throw the default constructur (N=0), and after that (only in the Y case) there is a call of the other constructor(N=3).
How did you check that ? For the case of Y(3) the default constructor is not called (only the ctor with a parameter is called). I think you did something wrong while debugging.
|
|
|
|
|
mmm....,
yes: there is something strange!
something doesn't work somewhere in the 'real' code class!
sorry to disturb you!
I have to solve by myself this problem
|
|
|
|
|
Hi boy,
Try my code below, and you will see.
--------------------
#include <iostream>
class MyClass
{
int iA;
int iB;
public:
MyClass() : iB(0) {
std::cout << "MyClass() \n";
}
MyClass(int n) : iB(0) {
std::cout << "MyClass(" << n << ") \n";
iA = n;
}
};
int main()
{
std::cout << "MyClass aa; \n";
MyClass aa;
std::cout << "MyClass bb; \n";
MyClass bb(3);
return 0;
}
Maxwell Chen
|
|
|
|
|
Thanks friend.
The error was in another point of my code. Now I got it.
sorry to disturb you.
|
|
|
|
|
hi all
I started to study assembler.
Can I compile assembler code in VS2003.Net ?
If yes where ?
thank you
|
|
|
|
|
You can only compile inline assembler, which means some assembly code in C/C++ source files. As example below:
void foobar()
{
__asm
{
mov AX, 3h
mov BX, 82h
int 17h
}
}
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: You can only compile inline assembler
From your answer, I assume that it would surprise you to learn that this is not true, in the sense that Visual Studio 2003 Pro comes complete with Microsoft's stand-alone assembler (ML, which to me is just a new name for MASM). You can add .ASM files to your project and have them assembled as part of the project, but you need to set up a Custom Build step to do it. At least, that's how I'm doing it in a VS 2003 C++ project I'm working on right now.
|
|
|
|
|
Using C++ you can use inline assembley. i.e.
__declspec(naked) int __stdcall ReturnOne()
{
__asm
{
mov eax, 1
ret
}
}</code>
Steve
|
|
|
|
|
Stephen Hewitt wrote:
__declspec(naked) int __stdcall ReturnOne()<br />
{<br />
__asm <br />
{ <br />
mov eax, 1<br />
ret <br />
}<br />
}
Is this valid based on your code... ?
void foo()<br />
{<br />
__asm CALL ReturnOne
}
Maxwell Chen
|
|
|
|
|
|
why does that "e" comes when its a 32 bit thing?
do we separately have a reg in that name, or its just a part of AX ? like (AL,AH) ??
NULL
|
|
|
|
|
Yeah, EAX is the 32bit equivalent of AX . The lower 16 bits is AX.
Steve
|
|
|
|
|
Stephen Hewitt wrote: Yeah, EAX is the 32bit equivalent of AX. The lower 16 bits is AX.
Thanks for your reply.
And how do you call the upper 16 bits of EAX ?
NULL
|
|
|
|
|
Just so your searches and such are more productive, remember that an assembler compiles assembly code.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
hi all,
i want to know when a mail arrives from outlook i want to know that a notification of mail.
Any Interface to Notify a mail please provide a snippet of code.
thanks,
uday.
uday kiran
-- modified at 5:04 Monday 8th May, 2006
|
|
|
|
|
I think there is no notification message but you can periodically check the incming messages I mean check every 1,2,3,4 0r 5 min if there is any Unread message in the Inbox .
Or you can Take help from:
www.outlookcode.com
If you have to expose teh functionality of OUtlook you have to implement IDT_Extensbility2 interface
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Search for OnItemAdd event for outlook.
Large cats have been scientifically proven to dream. Among the recurring themes are balls of yarn, mice, and half-blind overweight shackled oryx.
|
|
|
|
|
hi monty,
i am very much thank full to you giving your best solution, i am proceeding as you told. and many many thanks for giving me the solution.
thanks and regards,
uday.
uday kiran
|
|
|
|
|
i getting this error while using List box can u help me with this.
error C2228: left of '.AddString' must have class/struct/union type
Error executing cl.exe.
|
|
|
|
|
The left part of AddString has probably a typo mistake. Post some code if you can't find the solution.
|
|
|
|
|
CStatusDlg::m_OUTPUT.AddString(e->filename);
if i remove the CStatusDlg then i will get the error
error C2065: 'm_OUTPUT' : undeclared identifier
|
|
|
|