Create Windows "shortcut" (.lnk) with D?

Andrea Fontana via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 7 00:26:47 PST 2016


On Sunday, 6 March 2016 at 20:13:39 UTC, 岩倉 澪 wrote:
> On Sunday, 6 March 2016 at 11:00:35 UTC, John wrote:
>> On Sunday, 6 March 2016 at 03:13:23 UTC, 岩倉 澪 wrote:
>>>     IShellLinkA* shellLink;
>>>     IPersistFile* linkFile;
>>>
>>> Any help would be highly appreciated as I'm new to Windows 
>>> programming in D and have no idea what I'm doing wrong!
>>
>> In D, interfaces are references, so it should be:
>>
>>   IShellLinkA shellLink;
>>   IPersistFile linkFile;
>
> That's exactly what the problem was, thank you!!

You can use official specs to recreate binary file:
https://msdn.microsoft.com/en-us/library/dd871305.aspx

Ok, not the fastest way. :)


More information about the Digitalmars-d-learn mailing list