Click here to Skip to main content
14,391,319 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Linux Feasibility Question Pin
David O'Neil7-Nov-19 14:04
professionalDavid O'Neil7-Nov-19 14:04 
GeneralRe: Linux Feasibility Question Pin
charlieg7-Nov-19 18:09
Membercharlieg7-Nov-19 18:09 
GeneralRe: Linux Feasibility Question Pin
Chris C-B7-Nov-19 21:43
MemberChris C-B7-Nov-19 21:43 
GeneralRe: Linux Feasibility Question Pin
Mike Hankey7-Nov-19 11:53
professionalMike Hankey7-Nov-19 11:53 
GeneralRe: Linux Feasibility Question Pin
David O'Neil7-Nov-19 12:25
professionalDavid O'Neil7-Nov-19 12:25 
GeneralRe: Linux Feasibility Question Pin
Dar Brett7-Nov-19 13:36
MemberDar Brett7-Nov-19 13:36 
GeneralRe: Linux Feasibility Question Pin
David O'Neil7-Nov-19 14:07
professionalDavid O'Neil7-Nov-19 14:07 
GeneralThe unholy hell of trying to disable Pinning... Pin
Dave Kreskowiak7-Nov-19 10:15
mveDave Kreskowiak7-Nov-19 10:15 
An app I'm working on needs to disable the option to pin the app to the Start and Taskbar. Why? Security concerns. I know, right?!

OK, dig into Google to find out what's involved.

Hmmmm... not much on this except for Raymond Chen's blog post on it with a tiny little C snippet that does it, and the WindowsAPICodePack.

Aight. The codepack is HUGE for what I need it for. One of the restrictions on my app is to make the resulting .EXE as small as possible. The codepack weighs in at almost 700K. This is not an option for an app that has to stay small.

Next option. Write up Raymond's code into a tiny little C++ CLI library and just reference that from the main app.

Crap! Can't do that either. The C++ library targets Win32, not straight-up IL. This is a problem because I also need to keep the app as a single .EXE file with no external .DLL's. To do this, I use ILMerge as a post-build step to roll in my library .DLLs, but it won't throw a Win32 .DLL into a .NET .EXE (and still work.)

Soooooo.... last option. Get the source for the WindowsAPICodePack and strip it down to the ... HOLY ELEPHANTING HELL! Over 50,000 lines of code in this thing! [mutters to self] Is there any part of Windows this thing doesn't wrap?

OK, start digging through and learning the code base. It turns out the thing is nicely organized, but every class is seemingly dependent on every other class. Apparently, complexity was a design requirement. Basically, this library is a massive pile of manually written COM-interop without all the automated helpers Visual Studio and the tools generates for you when you add a reference to a COM .DLL. All this work is necessary because the Windows .DLL that handles this, PropSys.dll, is not COM-exposed.

It took me two days, and a bunch of Beer | [beer] , to slash and burn the code like a Brazilian rain forest with the final result down to about 100 lines of code and a 19K .DLL that ILMerge can deal with. With a bit more time I don't have, I can make it smaller.

Three days to remove one little option on the Taskbar.

GeneralRe: The unholy hell of trying to disable Pinning... Pin
OriginalGriff7-Nov-19 10:26
mveOriginalGriff7-Nov-19 10:26 
GeneralRe: The unholy hell of trying to disable Pinning... Pin
Dave Kreskowiak7-Nov-19 10:42
mveDave Kreskowiak7-Nov-19 10:42 
GeneralRe: The unholy hell of trying to disable Pinning... Pin
OriginalGriff7-Nov-19 10:54
mveOriginalGriff7-Nov-19 10:54 
GeneralRe: The unholy hell of trying to disable Pinning... Pin
Nelek7-Nov-19 14:27
protectorNelek7-Nov-19 14:27 
GeneralRe: The unholy hell of trying to disable Pinning... Pin
RickZeeland7-Nov-19 10:58
communityengineerRickZeeland7-Nov-19 10:58 
GeneralRe: The unholy hell of trying to disable Pinning... Pin
Phil J Pearson7-Nov-19 23:46
MemberPhil J Pearson7-Nov-19 23:46 
GeneralRe: The unholy hell of trying to disable Pinning... Pin
Dave Kreskowiak8-Nov-19 3:29
mveDave Kreskowiak8-Nov-19 3:29 
QuestionDesigner or No Designer? What say you? Pin
MSBassSinger7-Nov-19 7:58
professionalMSBassSinger7-Nov-19 7:58 
AnswerRe: Designer or No Designer? What say you? Pin
ZurdoDev7-Nov-19 8:03
professionalZurdoDev7-Nov-19 8:03 
AnswerRe: Designer or No Designer? What say you? Pin
Marc Clifton7-Nov-19 8:19
mvaMarc Clifton7-Nov-19 8:19 
GeneralRe: Designer or No Designer? What say you? Pin
Gary Wheeler8-Nov-19 2:39
MemberGary Wheeler8-Nov-19 2:39 
GeneralRe: Designer or No Designer? What say you? Pin
Matt McGuire12-Nov-19 7:56
professionalMatt McGuire12-Nov-19 7:56 
GeneralRe: Designer or No Designer? What say you? Pin
Gary Wheeler13-Nov-19 2:46
MemberGary Wheeler13-Nov-19 2:46 
AnswerRe: Designer or No Designer? What say you? Pin
Jacquers7-Nov-19 8:32
MemberJacquers7-Nov-19 8:32 
GeneralRe: Designer or No Designer? What say you? Pin
Mario Luis7-Nov-19 22:39
MemberMario Luis7-Nov-19 22:39 
AnswerRe: Designer or No Designer? What say you? Pin
Richard Deeming7-Nov-19 8:35
communityengineerRichard Deeming7-Nov-19 8:35 
GeneralRe: Designer or No Designer? What say you? Pin
Jacquers7-Nov-19 22:38
MemberJacquers7-Nov-19 22:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.