From: kathy on
I add:

#define _WIN32_IE 0x5000
#include <ShlObj.h>

and also put the SDK lib and SDK include to the top. But same problem.

What I am missing?

From: kathy on
I also add "shell32.lib" to property->Linker->input->additional
dependencies

From: Pete Delgado on

"Vipin" <Vipin(a)nospam.com> wrote in message
news:%23FFpLKsGGHA.3320(a)TK2MSFTNGP12.phx.gbl...
> void main()

What language is that??? For both standard C and C++ that is an invalid
signature for main...

http://www.delorie.com/djgpp/v2faq/faq22_25.html
http://public.research.att.com/~bs/bs_faq2.html

-Pete


From: Vipin on
What is the problem with this signature? I have been programming in c/c++
exclusively for past 7 years
and this is not my first program, OK. Go create a c/c++ file, compile and
see. I don't care whatever links
you give me.

void main()
{
}

--
Vipin Aravind
Microsoft - MVP

"Pete Delgado" <Peter.Delgado(a)noads.net> wrote in message
news:ecEYZi6GGHA.1396(a)TK2MSFTNGP11.phx.gbl...
>
> "Vipin" <Vipin(a)nospam.com> wrote in message
> news:%23FFpLKsGGHA.3320(a)TK2MSFTNGP12.phx.gbl...
>> void main()
>
> What language is that??? For both standard C and C++ that is an invalid
> signature for main...
>
> http://www.delorie.com/djgpp/v2faq/faq22_25.html
> http://public.research.att.com/~bs/bs_faq2.html
>
> -Pete
>


From: Pete Delgado on

"Vipin" <Vipin(a)nospam.com> wrote in message
news:eGZdYu6GGHA.312(a)TK2MSFTNGP09.phx.gbl...
> What is the problem with this signature?

Did you read the links I provided? It is not valid C or C++. The compiler
and runtime are free to do *anything* they want with this. From crashing
your program to launching nuclear missiles.

> I have been programming in c/c++ exclusively for past 7 years
> and this is not my first program, OK.

Then you have been making the same mistake for 7 years. You should be
improving.

> Go create a c/c++ file, compile and see.

Just because something compiles and links does not make it a correct
program. This issue is addressed in the first link that I gave to you.

The funny thing is that you are repeating the same argument that most novice
programmers. The sad part is that you are an Microsoft MVP and are just as
wrong and you are teaching new programmers incorrect information.

I suppose one could make the case that you never plan to use another
compiler or another platform, however, if you disable language extensions on
the VS 2005 compiler, you will indeed get the proper warning.

C4326: return type of 'main' should be 'int' instead of 'void'

So I guess that means that you can't change the default compiler settings
either if you plan to continue to use the non-standard contruct.

>I don't care whatever links
> you give me.

That's obvious judging from your general attitude.

>
> void main()
> {
> }

Isn't now, and never was standard C or C++...

-Pete