|
Visual Studio is an Integrated Development Environment (editor, debugger, wizards, etc..) that also includes compilers for various languages.
.NET Framwork SDK is simply a software development kit. It doesn't include an IDE or any of that stuff.
VC7 is more standard compliant than VC6, but it's still not 100% and is missing a few key (but advanced) features.
Chances are, there won't be a VC7 certification for a while yet... so you might as well take the vc6 ones.
VC7 rocks.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
vinuk wrote:
1. What is the differenes between .NET Framework SDK and Visual Studio?
Visual Studio is an IDE, while .NET Framework SDK is a development kit. You can make .NET programs without VS, but not without SDK.
vinuk wrote:
2. I am currently learning standard ansi c++, and I am wondering whether I should learn VC++ 6 or VC++ 7 next.
There is not such a big difference between VC6 and VC7, if you don't count Managed C++.
vinuk wrote:
3. If I were to take the VC++ 6 Desktop Apps Certification exam would it be worth it or wait for Vc++ 7.
I think you should wait for Vc++7.
vinuk wrote:
4. Is VC++ 7 compaitable with ANSI C++?
Almost
vinuk wrote:
5. Who here actually likes Visual studio 7 or .NET ?
I like VS7 very much, but I'm not quite sure about .NET
I vote pro drink
|
|
|
|
|
|
Try PostMessage(WM_CHAR, ...)
|
|
|
|
|
Please read below article ...
It mean i can't use inp and outp on NT ?
So, what i can use instead inp() and outp() functions ?
Help me !
DOC: Port I/O with inp() and outp() Fails on Windows NT
ID: Q112298
--------------------------------------------------------------------------------
The information in this article applies to:
The C Run-Time (CRT), included with:
Microsoft Visual C++, 32-bit Editions, versions 1.0, 2.0
--------------------------------------------------------------------------------
SUMMARY
Attempting to use the port I/O (input/output) functions such as inp() and outp() from within an application for Windows NT running in user mode causes a privileged instruction exception to occur. The sample code provided in the OUTP.C online help sample for the outp() function and related functions can be used to illustrate this behavior.
The documentation regarding the compatibility of the port I/O functions is incomplete. Win32-based applications that call inp(), outp(), and so forth can be successfully compiled and linked. However, these applications will generate the privileged instruction exception because the port I/O functions cannot be called from code running in user mode.
Do not call the following functions from within a Win32-based application executing in user mode:
_inp()
_inpw()
_inpd()
_outp()
_outpw()
_outpd()
NOTE: This documentation error has been corrected for the Visual C++ 4.0 Books Online. The descriptions of the various port I/O functions do not list "Win NT" in the Compatibility section.
MORE INFORMATION
According to the documentation provided with Visual C++ 32-bit Edition, inp(), outp(), and the other port I/O related functions are Win32 and Win32s compatible. However, executing code that uses these functions causes a privileged instruction exception on Win32 on Windows NT. The code that uses inp(), outp(), and so forth will execute correctly on Win32s.
The inp(), outp(), and other I/O port related functions map to privileged processor instructions. For example, on Intel processors, the inp() and outp() functions end up calling the IN and OUT instructions. The privileged instruction exception occurs when these instructions are executed because typical Windows NT applications execute in a nonprivileged (user) mode. Only code executing in kernel mode has the necessary rights to execute privileged instructions. Kernel mode code is typically found in device drivers.
For more information on user mode and kernel mode in Windows NT, refer to the Microsoft Press book "Inside Windows NT" by Helen Custer. For an example of a kernel mode Windows NT device driver that allows user mode applications to access hardware ports, refer to the GENPORT sample provided with the Microsoft Windows NT Device Driver Kit (DDK).
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Thanks for your helps,
Your helps is useful for me, always
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
The article you reference tells you what to do.
"For an example of a kernel mode Windows NT device driver that allows user mode applications to access hardware ports, refer to the GENPORT sample provided with the Microsoft Windows NT Device Driver Kit (DDK)."
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
code :
void CreateConnetion(){
try{m_db.Open("xxxxx.MDB",FALSE,TRUE); }
catch(CDAOException *e){ .... }
}
void Open(CString Sql){
CloseQuery();
m_pRecordset = new CDaoRecordset(&m_db);
try{m_pRecordset->Open(dbOpenDynaset,Sql,dbReadOnly);}
catch (CDaoException *e) {
...
}
...
}
void CloseConnection(){
CloseQuery();
if (m_db.IsOpen()){
m_db.Close();
}
}
void CloseQuery(){
if (m_pRecordset->IsOpen()){
m_pRecordset->Close();
}
delete m_pRecordset;
}
.
Each time when I call CreateConnection and Open("SELECT * from [table]") the memory size increase. After time when i call CloseConnection the memory size doesnt decrease and app needs 5 MB (before creating connection had 4 MB).
{{i use this code :
CreateConnection();
Open();
CloseConnection();
}}
Is is alright ?
Wizard_01
|
|
|
|
|
Hi all,
I have a class (MyFunctions) with a function in that, i defined it as protected ...
I have 3 other classes, i wanna use of my function in MyFunctions class in thease classes !
How can i do that ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Protected functions can only be used by instances of the class or derived classes. To make a member function available for use by other classes, declare it public.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks for your reply,
Can you explain to me about friend functions ?
and How can i use of that ?
Other question,
What is this distructure:
virtual ~DClassName();
and what is difference with:
~DClassName();
???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
A friend method (i.e. function) can be shared by specific classes (i.e. friends of the class). You can also declare friend members, and can even make an entire class a friend of other classes. See http://www.cee.hw.ac.uk/~rjp/Coursewww/CPPwww/friend.html for an explanation of C++ friendship.
Using a virtual destructor in class CMyClass ensures that it (the destructor) will be called when an instance of a derived object (eg: CMyDerivedClass : CMyClass) is destructed. Virtual destructors are executed in reverse order - i.e. the derived class destructor is called first, followed by the base class destructor. If you don't use a virtual destructor, destruction will stop in the derived class.
Imho, you should always declare destructors virtual, and design your classes such that anything constructed by a base class is destructed by that base class.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I'm using "PutFile()" and "GetFile()" to transfer files between a client and a FTP server.
How can I retrieve a progress of this operation (maybe a callback), to put the transfer progress in a ProgressBar ?
|
|
|
|
|
Windows XP has extremly annoying AutoPlay feature. For my application I need to turn it off completely for all drives. I already made next actions:
1) Set "Take no action" for all drives and all content types (Drive Properties - AutoPlay)
2) Handle QueryCancelAutoPlay registered Windows message and reply "No, thanks" for all content types, as described in http://msdn.microsoft.com/msdnmag/issues/01/11/autoplay/autoplay.asp
3) Set DWORD value AutoPlay to 0 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom
4) Set DWORD value AutoPlay to 0 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk
However, there is still one case when Windows XP opens Explorer for DVD disk. In some place in my program I format DVD RAM disk using format command-line utility (I run it using CreateProcess). After disk is formatted XP opens Explorer window for it. May be there are some other things to do with this (except using Windows 2000, NT etc.)?
|
|
|
|
|
Hi, i have a problem, there are a lot of interesting activex controls - but they are loaded dynamicaly (or not?) so i'm not sure if all the users will have them - can you help me - are there some activex controls that are installed on every win machine ? For example there is "Microsoft Forms Checkbox" (or socalled) is it available on every win-box ?
thanks a lot for explanation
john
|
|
|
|
|
Hi, All !!!
=======
why doesn't it work ???
void qwewDlg::OnButton1()
{
CPaintDC dc(this);
dc.Rectangle(20,20,200,200);
}
Is it because I must draw everything under WM_PAINT ???
Why ??
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
did u read the docs for the CPaintDC stuff?
maybe there are't any dc's available when u make the call?
why would you want to do direct drawing out of the OnPaint code anyways? there are times when it makes sense but they are generally very few and far between afaik
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
Maybe I'm just wondering ?
Maybe I wanna try things ?
Maybe I'm just curious ???
Maybe blah blah blah ?????
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
You can't create a paint DC outside of WM_PAINT.
In this case, just use a CClientDC. (I think, it has been a while since I have used MFC)
void qwewDlg::OnButton1()
{
CClientDC dc(this);
dc.Rectangle(20,20,200,200);}
}
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks
It works.
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
One more thing...
this works:
void qwewDlg::OnButton1()
{
CClientDC dc(this);
dc.Rectangle(20,20,200,200);
}
but this doesn't work:
void qwewDlg::OnButton1()
{
CClientDC dc(GetDesktopWindow());
dc.Rectangle(20,20,200,200);
}
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
|
Sagiv wrote:
Is it because I must draw everything under WM_PAINT ???
Yes. Imho, the right approach is to:- Maintain a list of objects drawn by your program. When the user clicks Button1, create a new "MyRectangle" object and add it to your list. Then call Invalidate(). This will instruct Windows to send your window a WM_PAINT message.
- In your OnPaint() handler, walk the list of objects and draw each one.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Dear all,
Can I use "typedef" with "class" ? (For some reason, I want to use "class" CA instead of "struct"..so..)
I mean, if I wrote the following things:
class CA
{
// omit
};
typedef CA* LPA;
I always got compile error like this:
error C2040: 'LPA': 'class CA' differs in levels of indirection from 'void ** '
How can I correct this error ? Anybody help me ?
Thanks a lot !
|
|
|
|