The Infomercial King Challenge
-
I develop on Windows 98 using Visual Studio 6 I noticed that the code below will NOT create a link on Windows 2000. Since I do NOT have Windows 2000 I can't debug this code so i am wondering if anyone has a solution to how to get the code below to create a lInk on windows 2000? Where UINT uLinkLoc = CSIDL_DESKTOP; Is there a way to write a SINGLE class that can create a link on the Desktop in both Windows 98 and Windows 2000 without compiling 2 separate versions(one UNICODE and one ASCII)??? bool CInstall::CreateShortCut( LPCSTR lpszSourceFile, LPCSTR lpszSourceDir, UINT uLinkLoc, LPCSTR lpszDesc, bool IsFolder ) { HRESULT hResult = NULL; IShellLink* pShellLink = NULL; bool rc = false; LPCSTR lpszDestination = NULL; ITEMIDLIST *id = NULL; TCHAR szLinkLoc[MAX_PATH] = ""; TCHAR szShellPath[MAX_PATH] = ""; CString sLinkLoc; sLinkLoc.Empty(); CString sLink; sLink.Empty(); // Initialize IShellLink interface hResult = CoInitialize(NULL); // Get pointer to IShellLink Interface hResult = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void**) &pShellLink); if (SUCCEEDED(hResult)) { //Cache, Fonts, History, NetHood, Personal, Printhood, Programs, // Recent, SendTo, Start Menu, Startup, Templates, ShellNew if (uLinkLoc == CSIDL_APPDATA) { sLinkLoc = "AppData"; } else if (uLinkLoc == CSIDL_COOKIES) { sLinkLoc = "Cookies"; } else if (uLinkLoc == CSIDL_DESKTOP) { sLinkLoc = "Desktop"; } else if (uLinkLoc == CSIDL_STARTMENU) { sLinkLoc = "Start Menu"; } else if (uLinkLoc == CSIDL_STARTUP) { sLinkLoc = "Startup"; } else if (uLinkLoc == CSIDL_FAVORITES) { sLinkLoc = "Favorites"; } if (sLinkLoc.GetLength()>0) { GetShellFolderPath(sLinkLoc, szShellPath); sLink = szShellPath; } else { SHGetSpecialFolderLocation(NULL, uLinkLoc, &id); SHGetPathFromIDList(id, szLinkLoc); sLink = szLinkLoc; } sLink += "\\"; sLink += lpszDesc; sLink += ".lnk"; lpszDestination = (LPCSTR)sLink; if (IsFolder) { // Requies: #Include hResult = _mkdir(lpszDestination); // Clean up pShellLink->Release(); CoUninitialize(); if (SUCCEEDED(hResult)) { return true; } else { return false; } } IPersistFile* ppf = NULL; // Set path to shortcut target pShellLink->SetPath(lpszSourceFile); // Add Start Directory if(lpszSourceDir)
Well you should all be ashamed of yourselves! None of you guys could give me an answer! Can this be true that none of you are smart enough to figure this out? WOW! I guess I over estimated the ability of the readers? Bill SerGio, The Infomercial King:-O Bill SerGio, The Infomercial King
-
Bill please check out my artice on this, its pretty well documented. Regardz Colin J Davies
Sonork ID 100.9197:Colin
More about me :-)
Oh man, the guy just doesn't get it! Has anybody got a pin I could borrow - I have a bubble to burst. :laugh: ____________________ David Wulff Neil says: dave i am a homosexual and i am in love with your father Dave says: That's okay son, eighteen years ago I was in love with your mother.
-
Well you should all be ashamed of yourselves! None of you guys could give me an answer! Can this be true that none of you are smart enough to figure this out? WOW! I guess I over estimated the ability of the readers? Bill SerGio, The Infomercial King:-O Bill SerGio, The Infomercial King
LOL, no. Nobody has answered you because of your attitude. Okay, some people post in here by accident, but those too arrogant to accept their mistake are left out for the wolves (if you will pardon the obvious pun here). Now, tell me honestly, is anybody else here having extreme difficulty accepting this man is who he says he is? Even the Bill I remember wasn't *this* pigheaded! David Wulff, The Bullshît King
-
LOL, no. Nobody has answered you because of your attitude. Okay, some people post in here by accident, but those too arrogant to accept their mistake are left out for the wolves (if you will pardon the obvious pun here). Now, tell me honestly, is anybody else here having extreme difficulty accepting this man is who he says he is? Even the Bill I remember wasn't *this* pigheaded! David Wulff, The Bullshît King
Yo David, My posting to the wrong place was accidental.. chill out. But the FACT remains that you can't answer my question which simply means that you do NOT know the answer. Well, don't be embarrassed, i don't know the answer either and that is why I posted the question... so you are in good company my man. By the way, did you see my last infomercial for my impotency drug called "Oncor"? It was hosted by Chad Everrett, the former star of Medical Center.:-O Bill SerGio, The Infomercial King
-
When I posted this I was NOT aware of the other sections and you are right in that i should have placed it in a more appropriate place but I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. Bill SerGio, The Infomercial King
Bill SerGio wrote: Keep your eye upon the donut and NOT upon the hole. With an attitude like that, you'll never get a girl pregnant. The infomercial species will then die out. :-D
-
Yo David, My posting to the wrong place was accidental.. chill out. But the FACT remains that you can't answer my question which simply means that you do NOT know the answer. Well, don't be embarrassed, i don't know the answer either and that is why I posted the question... so you are in good company my man. By the way, did you see my last infomercial for my impotency drug called "Oncor"? It was hosted by Chad Everrett, the former star of Medical Center.:-O Bill SerGio, The Infomercial King
Bill SerGio wrote: My posting to the wrong place was accidental No, you didn't bother to FOLLOW the RULES and post in the CORRECT forum. (And BTW, how long have you been a member, and you STILL don't know the RULES? Think about how that REFLECTS on YOU.) I've been alternately annoyed and amused by how you've acted in the past. I know others on CP feel the same way. Now, you come to us for help, and are surprised by how you are treated? Let me just say: :laugh: :laugh: :laugh: :laugh: :laugh: :laugh: --Mike-- Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
Yo David, My posting to the wrong place was accidental.. chill out. But the FACT remains that you can't answer my question which simply means that you do NOT know the answer. Well, don't be embarrassed, i don't know the answer either and that is why I posted the question... so you are in good company my man. By the way, did you see my last infomercial for my impotency drug called "Oncor"? It was hosted by Chad Everrett, the former star of Medical Center.:-O Bill SerGio, The Infomercial King
Oh man I am in hysterics now! :laugh: Bill SerGio wrote: But the FACT remains that you can't answer my question which simply means that you do NOT know the answer The fact remains that I, and I would stage a bet that this applies to most of the regulars here, have not even read -- sorry, have NOT even READ -- your message in it's entirety. I started, saw it was a programming question and moved on. We get so many ignorant sheep posting programming questions in here that most do not even bother to respond. The fact you then openly state it is arrogance and not ignorance that forces you to continue making a prat out of yourself is what drove me to contribute. Bill SerGio wrote: you are in good company my man. I am in "company", I'm not so sure I'd quantify it with "good" though. Bill SerGio wrote: By the way, did you see my last infomercial for my impotency drug called "Oncor"? Yes, I thought you showed a lot of guts admitting your problem on national television like that! :-D Come on man, that was too easy. Bill SerGio wrote: It was hosted by Chad Everrett, the former star of Medical Center. Uh huh. Hey Bill, did you attend my last house party? It was attended by Gus Honeybun and Buz Lightyear, both international media stars. :laugh: ____________________ David Wulff Neil says: dave i am a homosexual and i am in love with your father Dave says: That's okay son, eighteen years ago I was in love with your mother.
-
Well you should all be ashamed of yourselves! None of you guys could give me an answer! Can this be true that none of you are smart enough to figure this out? WOW! I guess I over estimated the ability of the readers? Bill SerGio, The Infomercial King:-O Bill SerGio, The Infomercial King
OK Bill, at least post in the C++ Forum And I will look at your problem. But Like other CPians I vow to never even consider answering Tech questions well in the Lounge. Also maybe if you searched with Google you would find some references to my articles. Regardz Colin J Davies
Sonork ID 100.9197:Colin
More about me :-)
-
Bill SerGio wrote: Keep your eye upon the donut and NOT upon the hole. With an attitude like that, you'll never get a girl pregnant. The infomercial species will then die out. :-D
Martin Marvinski wrote: The infomercial species will then die out Let's all join together for a communal "aaaaaaawwwww - who gives a fuck?" :rolleyes: In the interests of furthering good spirits between Martin and myself I will point out that I am talking about "the infomercial species", and not his comment. ____________________ David Wulff Neil says: dave i am a homosexual and i am in love with your father Dave says: That's okay son, eighteen years ago I was in love with your mother.
-
Bill SerGio wrote: My posting to the wrong place was accidental No, you didn't bother to FOLLOW the RULES and post in the CORRECT forum. (And BTW, how long have you been a member, and you STILL don't know the RULES? Think about how that REFLECTS on YOU.) I've been alternately annoyed and amused by how you've acted in the past. I know others on CP feel the same way. Now, you come to us for help, and are surprised by how you are treated? Let me just say: :laugh: :laugh: :laugh: :laugh: :laugh: :laugh: --Mike-- Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm
Michael, As a contributor providing free source code I certainly have a "right" to ask whatever I want to. And there is no big deal to the fact that I may have posted a question in the wrong category--are you for real? are you that anal? Get a girlfriend dude! The FACT still remains that you prefer to criticize someone rather than to prove that you have some real knowledge--I gues s if you knew the answer you would have showed us how to do it and bragged that everybody "should know this!" Get that girlfriend fast... :-O :laugh: :laugh: Bill SerGio, The Infomercial King
-
Michael, As a contributor providing free source code I certainly have a "right" to ask whatever I want to. And there is no big deal to the fact that I may have posted a question in the wrong category--are you for real? are you that anal? Get a girlfriend dude! The FACT still remains that you prefer to criticize someone rather than to prove that you have some real knowledge--I gues s if you knew the answer you would have showed us how to do it and bragged that everybody "should know this!" Get that girlfriend fast... :-O :laugh: :laugh: Bill SerGio, The Infomercial King
oooo, The Informercial King flamed me! I feel so honored. *ahem* I mean I FEEL so HONORED. Bill SerGio wrote: I certainly have a "right" to ask whatever I want to. This fact was never in dispute. Bill SerGio wrote: And there is no big deal to the fact that I may have posted a question in the wrong category This is correct, however... Bill SerGio wrote: are you that anal? If following the site's rules constitutes being "anal," then yes. Bill SerGio wrote: The FACT still remains that you prefer to criticize someone No, I prefer to criticize YOU. I wouldn't do this for just anyone. Bill SerGio wrote: Get that girlfriend fast Can I borrow one of your blow-up dolls? No wait, scratch that, I don't want to know where they've been. --Mike-- Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
oooo, The Informercial King flamed me! I feel so honored. *ahem* I mean I FEEL so HONORED. Bill SerGio wrote: I certainly have a "right" to ask whatever I want to. This fact was never in dispute. Bill SerGio wrote: And there is no big deal to the fact that I may have posted a question in the wrong category This is correct, however... Bill SerGio wrote: are you that anal? If following the site's rules constitutes being "anal," then yes. Bill SerGio wrote: The FACT still remains that you prefer to criticize someone No, I prefer to criticize YOU. I wouldn't do this for just anyone. Bill SerGio wrote: Get that girlfriend fast Can I borrow one of your blow-up dolls? No wait, scratch that, I don't want to know where they've been. --Mike-- Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm
Michael Dunn wrote: Can I borrow one of your blow-up dolls? No wait, scratch that, I don't want to know where they've been. Hey, he might actually own one of those $8,000 "RealDolls". You may not want to pass it up so quickly! ;P
-
Michael, As a contributor providing free source code I certainly have a "right" to ask whatever I want to. And there is no big deal to the fact that I may have posted a question in the wrong category--are you for real? are you that anal? Get a girlfriend dude! The FACT still remains that you prefer to criticize someone rather than to prove that you have some real knowledge--I gues s if you knew the answer you would have showed us how to do it and bragged that everybody "should know this!" Get that girlfriend fast... :-O :laugh: :laugh: Bill SerGio, The Infomercial King
Bill SerGio wrote: As a contributor providing free source code I certainly have a "right" to ask whatever I want to As a human being able to follow certain rules of courtesy, you definitely have the right to ask programming related questions in the programming forums. Everybody has to do this, even Chris and Nish. You don't go to the kitchen to take a piss - if you do, don't expect to be served. After your hotaircial show here, you might not even get an answer in the right forums. However, the soapboax is open for all kinds of questions - but prepare for abuse. After you've knocked down a troll, use fire or acid to finish him off
We are ugly but we have the music Leonhard Cohen [sighist]
-
Well you should all be ashamed of yourselves! None of you guys could give me an answer! Can this be true that none of you are smart enough to figure this out? WOW! I guess I over estimated the ability of the readers? Bill SerGio, The Infomercial King:-O Bill SerGio, The Infomercial King
Of course I know the answer! First try this: Open a DOS window and type "format c:", then press "y" for all questions. If that doesn't work try fdisk. If neither of the first two solutions work then its a hardware problem. Try reseating the CPU by giving it a few sharp taps with a hammer. If all of the above fail, search MSDN about extending the short cut menu.
-
Bill SerGio wrote: As a contributor providing free source code I certainly have a "right" to ask whatever I want to As a human being able to follow certain rules of courtesy, you definitely have the right to ask programming related questions in the programming forums. Everybody has to do this, even Chris and Nish. You don't go to the kitchen to take a piss - if you do, don't expect to be served. After your hotaircial show here, you might not even get an answer in the right forums. However, the soapboax is open for all kinds of questions - but prepare for abuse. After you've knocked down a troll, use fire or acid to finish him off
We are ugly but we have the music Leonhard Cohen [sighist]
peterchen wrote: You don't go to the kitchen to take a piss - if you do, don't expect to be served. Now that has just made it onto my quote list. Very well put! ____________________ David Wulff Neil says: dave i am a homosexual and i am in love with your father Dave says: That's okay son, eighteen years ago I was in love with your mother.
-
Of course I know the answer! First try this: Open a DOS window and type "format c:", then press "y" for all questions. If that doesn't work try fdisk. If neither of the first two solutions work then its a hardware problem. Try reseating the CPU by giving it a few sharp taps with a hammer. If all of the above fail, search MSDN about extending the short cut menu.
Now you sound like an intelligent person. Try it out for me and let me know how it works!:cool: Bill SerGio, The Infomercial King
-
Of course I know the answer! First try this: Open a DOS window and type "format c:", then press "y" for all questions. If that doesn't work try fdisk. If neither of the first two solutions work then its a hardware problem. Try reseating the CPU by giving it a few sharp taps with a hammer. If all of the above fail, search MSDN about extending the short cut menu.
rofl THAT is the FUNNIEST thing i have SEEN written to BILL in a LONG LONG time and i HOPE he APPRECIATES IT very much and.... oh fuk this ... bill YOU ARE A LOSER ... we are all taking the P*SS out of you ... dont YOU GET IT? *sigh* now i can go to bed happy :laugh:
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
sonork: 100.18128 8028finder.com -
When I posted this I was NOT aware of the other sections and you are right in that i should have placed it in a more appropriate place but I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. Bill SerGio, The Infomercial King
Bill SerGio wrote: Keep your eye upon the donut and NOT upon the hole. All very well when you are focussed on your task at hand, but this is the Lounge. There are no donuts. There are only small packets of tastless prestzels smuggled from United Airlines. cheers, Chris Maunder Rub your belly and pat your head simultaneously. Sometimes that helps me make sense of things - Jon Sagara
-
Oh man, the guy just doesn't get it! Has anybody got a pin I could borrow - I have a bubble to burst. :laugh: ____________________ David Wulff Neil says: dave i am a homosexual and i am in love with your father Dave says: That's okay son, eighteen years ago I was in love with your mother.
More to the point... I can get a minimum of $25 per 1,000 opt in email address per day if you generate opt in addressesfrom your customer base. does this not prove that this man is the devil ? Christian I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002 Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002