 |
|
 |
I can't seem to get this to run under windows server 2008 R2 (64 bit). Is it possible? Can you help?
|
|
|
|
 |
|
 |
Do you anybody know, how to get target exe in such lnk? For example, if you install MS Office 2007 target lnk are not pointed to word.exe etc. , but to windows installer\[some GUID]\[exe with icon], but how to resolve correct exe (exe, that is executed, when you doubleclick that LNK)?
|
|
|
|
 |
|
 |
Code causes problems - application hangs, after function ResolveLink call.
Parameters SLR_ANY_MATCH | SLR_NO_UI | SLR_UPDATE were added in psl->Resolve.
Here modification in function ResolveLink:
...
hres = ppf->Load(LnkFile, STGM_READ);
if (SUCCEEDED(hres))
{
hres = psl->Resolve(GetDesktopWindow(), SLR_ANY_MATCH | SLR_NO_UI | SLR_UPDATE);
...
BR,
Rudi.
|
|
|
|
 |
|
 |
Hi..All..
what is A2W converter, how it is used.
why we write USING_CONVERSION, before using convertors.
Thanq..
sheshidar
|
|
|
|
 |
|
 |
It gave me unresolved external g_pfnGetThreadACP under VS2005. Including atlbase.h solved the problem.
|
|
|
|
 |
|
 |
thx =)
- thomasa88
-- modified at 19:11 Monday 26th June, 2006
Im not very good on c++ compile flags, how should they be set for vs 2005? Right now I just changed /MT to /MD
|
|
|
|
 |
|
 |
I've tried to use the lib in the following way:
//Creating a shortcut
ShortCut sc = new ShortCut();
sc.FilePath = "http://google.dk";
sc.LnkPath = "c:\\a b c.lnk";
sc.LnkDesc = "This runs notepad";
sc.WorkDir = "C:\\";
sc.CreateLink();
//Resolving a shortcut
sc.LnkPath = "C:\\a b c.lnk";
sc.ResolveLink();
Console.WriteLine("File is {0}",sc.FilePath);
Console.WriteLine("Description is {0}",sc.LnkDesc);
Console.WriteLine("Woirking Dir is {0}",sc.WorkDir);
The link is successfully created, and is working fine with an http address,
but when you try to resolve it, the filepath is empty?
The documentaion for IShellLink don't say anything about http links,
do anybody have a clue?
I'm using the lib in relation to Explorer favorites and there for i need to work with http links.
Troels Richter
Thinksharp.dk
|
|
|
|
 |
|
 |
Hello Nish,
i want to use this great feature, but my intend ist to avoid the distribution of more than one file (the .exe file).
In this case i can't generate a .dll and ship them along with the .exe.
Now the question:
Is there a chance to get the contents of the library in c# instead of c++?
In this case i can copy the source directly into my project (visual studio .net) and compile it.
thx in advance
|
|
|
|
 |
|
|
 |
|
 |
I would use this class too, if there was an "iconpath" property that allowed me to specify the path to the icon for the shortcut.
|
|
|
|
 |
|
 |
I want to create MSI Links on the Desktop. Is there a solution?
Thanks
Matthias
|
|
|
|
 |
|
 |
I downloaded the shortcut project and compiled it, and referenced the dll using C#.
It is working perfectly. Excellant work, you have saved me time.
Also I liked your approach, as you used C++ to write the utility, in my opinion this is the best way to implement shortcuts for .NET languages.
Have a great week!
Russell Mangel
Las Vegas, NV
Russell Mangel
Las Vegas, NV
|
|
|
|
 |
|
|
 |
|
 |
I tried to use your code, by adding a reference to the DLL,
but i get an error message when compiling my project (called TestPictures)
The strange thing is that i get no error messages when adding the reference in my project. The DLL is located in My InetPub/wwwroot/bin directory. I also checked the properties of the DLL (ok for read and execute), but still that doesn't work
Can you please help me on that point ?
The message i get is the following one :
Server Error in '/TestPictures' Application.
-------------------------------------------------------------------
Access is denied: 'ShortCut'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Access is denied: 'ShortCut'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'ShortCut' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = ShortCut, Version=1.0.1196.18153, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/inetpub/wwwroot/TestPictures
LOG: Initial PrivatePath = bin
Calling assembly : TestPictures, Version=1.0.1196.19450, Culture=neutral, PublicKeyToken=null.
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: ShortCut, Version=1.0.1196.18153, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testpictures/06cd0ac2/161adc7/ShortCut.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testpictures/06cd0ac2/161adc7/ShortCut/ShortCut.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/TestPictures/bin/ShortCut.DLL.
Stack Trace:
[FileLoadException: Access is denied: 'ShortCut'.]
TestPictures.WebForm3.Page_Load(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
Johanna
|
|
|
|
 |
|
 |
I haven't done ASP.NET but I think this might be some IIS permission issue. I suggest that you post this in the C# and/or the ASP.NET forums. Perhaps someone might be able to help you.
Sorry for the rather useless answer
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
 |
|
 |
I have the same problem. Did you find a solution?
Thanks
Marco
|
|
|
|
 |
|
 |
I think this code is very useful. The only problem is that I have no idea if the shortcut file is created or not.
Eg.
sc.FilePath = filename;
....
sc.CreateLink();
// Then manually check if the link has been created
if (!File.Exists(filename))
{
// Inform the user the shortcut was not created
}
I thought it may be better to return a value / throw an exception when the actual shortcut is not created.
Matt
|
|
|
|
 |
|
|
 |
|
 |
Don't I feel stoopid
thanks
|
|
|
|
 |
|
|
 |
|
 |
Hey Nish,
I think you have a lot of fans here. I realized that your first two ratings are two 1s. There are some guys here who love you (I think).
I dont know what their problem is but it is for sure that you deserve much better ratings.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
 |
|
 |
Mustafa Demirhan wrote:
I think you have a lot of fans here. I realized that your first two ratings are two 1s. There are some guys here who love you (I think).
I dont know what their problem is but it is for sure that you deserve much better ratings.
Hello Mustafa,
It's been a while since I saw you. And you are not on Sonork [zoltrix] too these days.
Yeah, this article seems to have displeased a few
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
 |
|
 |
Nish [BusterBoy] wrote:
It's been a while since I saw you. And you are not on Sonork [zoltrix] too these days.
Unfortunately! I can rarely find some time to visit CodeProject. But things will be better in a week. My final exams will end this week.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
 |
|
 |
Good luck with your examinations
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
 |
|
 |
Instead of using Marhsal.CoTaskMemAlloc etc. (in your case) You can very easily convert String* to wchar_t* using PtrToStringChars function. this is defined in vcclr.h
Note that in that case you don't need to Free the memory.
King of Managed C++
|
|
|
|
 |