Jump to content

Glenn9999

Platinum Sponsor
  • Posts

    795
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by Glenn9999

  1. Thanks Glenn9999!

     

    So, what shall the programmer write so that the compiler uses the Sse or Avx?

     

    Usually if it's up to the compiler, it's just going to select whatever it thinks is best.  You really aren't going to know *exactly* what it does.  If you get an option, you can compile for certain architectures.  This is important because you need to be able to target for what is available to you.  Note, most compilers will default to the most common instruction *sets* unless you tell them different.  Like I indicated above, there's no real guarantees on any of the instruction sets you're going to get "most optimized" unless you provide a custom-written ASM function.  But then again, as I indicated above as well, it's not a concern to 99% of applications, since it has to be a CPU bottleneck, and the *best* algorithm is always better to be found than to optimize a crappy one.  After all, you can't polish a turd no matter how hard you try.

  2. Pretty much any of how you listed in descending order of prominence/priority.  Notably, if any optimizations are attempted of this nature, a profiler is run against the code and the bottleneck is identified.  Since it has to be a CPU oriented bottleneck (and not disk or API), the number of opportunities for being able to do what you're talking about is limited, and any optimized code is just a limited section of that.  Notably as well, adjusting the algorithm has much bigger impacts than looking for CPU instruction optimization - removing a crappy algorithm in favor of a better one will always net better results.

     

    The only other outstanding question is that compilers will support most of a subset of CPU instructions (but not all) available a reasonable time before the compiler is released.  Since it's a subset, it means the optimization route is always a possible valid one. (I'm reminded of the last two I did, which were optimizable with simple x86 assembler instructions to gain a good speed increase)

  3. Windows explorer and similar software can sort images by dimensions without using any extra "program", but sorting by aspect ratio is more difficult.  I would think there are other programs out there that can do that, but I've not looked for one.  Good job on "rolling your own". :)

     

     

    I recently had occasion to polish this program up (add some more variabiltiy rather than constants, and add file conversion capabillity).  I can share, if someone feels like playing with it.  Of course, if the demand's there for this kind of thing, that'll make it real good to release.

  4. I have a firmware upgrade for a RCA USB device which isn't working on Windows 8.1 x64.  I've tried all the compatibility settings, administration, etc, and it just doesn't show up / run in general.  Any advice/suggestions on how to get it to run?

  5. You never know what you run across at times.  I ended up picking up an original "The Oregon Trail" disk "for IBM/Tandy".  Of course, I don't have a drive that it works in anymore, but interesting that I was able to find it.  May look for it online I suppose if I get bored and see what the whole hype was.

  6. But, PROGRESS!!! you don't need a computer to play dvds or videos you need it for Facebook and to feed MS and the NSA your digital life.

     

     

     

    Indeed, the literal purpose of the computer has become that.  Heaven forbid that anyone expect a reliable tool to get things done that gets made more reliable with time and updates instead of worse.   This has always been the case, even back to XP with the file locking bug that they never fixed, and I had to run a stupid TSR to counter.  Not to mention, Explorer work is always a PITA and if I didn't have Classic Shell, 8.1 would be unusable.  Do you think they would make it better?  No, I have to run a stupid TSR now because KB2982791 broke one of my "working" programs because they introduced a bug in how it handles temp files.

     

    But none of that matters to Microsoft, just keep hemorraging cash for upgrades and personal data for the NSA (not to mention the obvious opportunity for corporate espionage given Microsoft by all this crap), and all is well to them.

  7. Seems like most Windows 10 fans just say "use VLC" or some such.  It is surprising how much reduction in functionality people are willing to put up with.

     

     

    Not to mention how unstable VLC (or Media Player Classic) is in many respects (I know, I've been testing how audio players handle playlists I've been writing from code and VLC is pretty terrible at that compared to other things).  Even in my upgrade to Windows 8.1, I discovered after the fact that it broke my DVD player app which worked fine for me in XP.  I haven't had a good option to play DVDs on my computer since.

  8. Maybe Microsoft realizes that no matter what they do, 3rd party developers will come along and save their bacon.

     

     

    Yeah, if it wasn't for Classic Shell, I'd be on someone's doorstep screaming about a refund over Windows 8.1.  Knowing that it burns the bridge back, I'm especially reticient about engaging the Windows 10 upgrade...

  9. Out of curiosity, what do you imagine will be the difference between that and the application the OS provides to do exactly that?

     

    What OS are you talking about running on?

     

    -Noel

     

     

    Next to little.  Just mentioning it as opposed to a one shot thing like the program posted in this thread.  Next to little between this app and going into Control Panel, uninstalling the update, and then hiding it in Windows Update.

  10. I may have to attempt this program and release it (generic as I was thinking - list updates available to system, uninstall what user chooses, allow hiding of updates, etc).

     

     

    And I did, at least a clone of this one.  Being generic would be very easy and probably more preferable since you're messing with bringing back full update lists anyway.  I get a corruption of the image every once in a while when I test it.   Basically put, you have to find the update in Windows Update, the problem is, it's rather slow sometimes.  Good part is, you get an existence test and a chance to hide the update.  The problem with it being slow is that it seems you have to use WU in order to hide the update.  Of course, the Uninstall method in the API only works for WSUS, so couldn't do that.

     

    Anyhow, since it was a just for fun thing, and don't want to horn in on this, have some source:

    procedure TForm1.Button1Click(Sender: TObject);const  theupdate = '3035583';  theupdateid = '1aa3ae66-f3e2-4f9d-a37f-7caa951ee2b0';  //GUID for 3035583var  UpdateSession: IUpdateSession;  UpdateSearcher: IUpdateSearcher;  SearchResult: ISearchResult;  Update: IUpdate;  updstring: string;  procid: DWord;  token: LongBool;begin  Button1.Enabled := false;  UpdateSession := CoUpdateSession.Create;  UpdateSearcher := UpdateSession.CreateUpdateSearcher();  UpdateSearcher.ServerSelection := 0;  UpdateSearcher.ClientApplicationID := 'test wuapimap';  UpdateSearcher.Online := true;  updstring := '(IsInstalled=1) and updateid=''' + theupdateid + '''';  Memo1.Lines.Add('Searching for Update ' + theupdate);  SearchResult := UpdateSearcher.Search(WideString(updstring));  if SearchResult.ResultCode <> 2 then // not success    begin      Memo1.Lines.Add('Search error.');      Button1.Enabled := true;      exit;    end;  if SearchResult.Updates.Count = 0 then // no updates returned    begin      Memo1.Lines.ADD('Update ' + theupdate + ' not found.');      Button1.Enabled := true;      exit;    end;  Update := SearchResult.Updates.Item[0];  Update.IsHidden := true;  Memo1.Lines.Add('Update ' + theupdate + ' hidden.');  Memo1.Lines.Add('Running uninstall - wusa.exe /uninstall /norestart /quiet /kb:' + theupdate);  DisableWow64Redirection(token);  Execute_program('wusa.exe', '/uninstall /norestart /quiet /kb:' + theupdate, procid, true);  RevertWow64Redirection(token);  UpdateSearcher._Release;  UpdateSession._Release;  if MessageDlg('The Machine Needs to be restarted.  Do it now?',              mtWarning, [mbYes, mbNo], 0) = mrYes then     machine_restart;  Button1.Enabled := true;end;
  11. I like this idea, but it may take a while for me to implement it. But a somewhat-related question, does anyone know a way to hide updates via C++ or the command line?

     

     

    I'd have to look into it - it's been quite a while since I worked with WUAPI, but I distinctly remember it possible to do through code.  I found out you could do just about everything on the system through the API, I'm sure hiding updates is a small task once you initialize the API.  Edit: I did.  Very easy.  Edit2: Though harder you can do the uninstall through the API too.  I may have to attempt this program and release it (generic as I was thinking - list updates available to system, uninstall what user chooses, allow hiding of updates, etc).

  12. What do you mean by more generic though?

    Something that presents a menu of installed updates and allows you to select the one you want to uninstall.

    In case you mean the updates in the menu ought to be limited to those listed in the thread about avoiding Win 10, I do fully agree.

     

     

    I meant something that lists all the updates installed on the system and then gives an option to uninstall the update in question.  Of course, it can be expanded to all available updates and allow updates to be hidden, too.

  13. I may do that, I am (and I already have code written for) also going to kill the GWX.EXE process after install and I am also thinking about adding an "Advanced Mode" that makes the Administrator owner of C:\WINDOWS\GWX, deletes its contents, and makes it read-only. What do you mean by more generic though?

     

     

    Something that presents a menu of installed updates and allows you to select the one you want to uninstall.

  14. Version 2.0 is here!

    <snip>

    Improves compatibility with Windows 8.1, I just used the manifest and hoped for the best. I currently don't have access to a Windows 8.1 VM so anyone that does, can you please verify that it works?

    <snip>

     

     

    Works great now.    Only thing that might be good to add is an existence check (put up a message) if the update is already present.  That wouldn't be too hard though.  Like I said earlier, it might be worth trying to rig something up that's more generic if there's enough demand.

  15. Like NoelC said, versioning is going away, but there is still limited use cases where it is required, like this. I still don't know what MS was thinking when they made Windows 8.1 NT 6.3 while still reporting NT 6.2 to applications.

    FWIW, it looks like the versioning will still happen with applications, but through that manifest and not entirely through code.

     

    Edit: Tried it. The iterative IsWindowsVersionOrGreater routine just appears to return the highest version number the application is manifested for.

    -Noel

     

     

    Actually, it's returning 6.3 on mine, as opposed to 6.2 on GetVersionEx.

  16. What do you mean by "similarly broken"?

     

    It returns the system version of whatever the latest version your application is manifested for.  The change is by design (however twisted the thinking).  You're no longer supposed to care what version of Windows you're running on.  Windows is in control, not you.  Didn't you get the memo?

     

    I meant in terms of what it returns.  On my system, GetVersionEx returns 6.2 in a program with no manifest, which is false since it's a Windows 8.1 install.   This also happens to describe rn10950's program(s) as a OS version check exists using this function, so they are effectively broken.

     

    But you basically explained why.  In the future, versioning is basically meaningless, so you have to resort to other methods.  In that sense, the application manifest is what determines the version returned, and what is put there determines what kind of app compatibility measures the OS undertakes.  So the application manifest (as I quoted it) becomes paramount much more than the OS version.

     

    Hence, rn10950's primary corrective is to add that compatibility manifest as I quoted.  Though it might be much more preferable from an OS standpoint for him/her to use IsWindowsVersionOrGreater than use GetVersionEx as was done.

     

    Of course, the problem with the application manifest is that I forsee having to do a release of my programs (BatchPatcher, namely, as it's the only thing I've done where OS ver return is important) every time Microsoft releases an OS.

  17. And....here's the explanation.

     

     

    In Windows 8.1, the GetVersion(Ex) APIs have been deprecated. That means that while you can still call the APIs, if your app does not specifically target Windows 8.1, you will get Windows 8 versioning (6.2.0.0).

     

     

    It's something I've already done in the past for a while (using compatibility manifest entries), but it looks like you need the app compatibility section of the manifest now in order to be fully Win 8.1 supporting.

     <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">    <application>      <!--The ID below indicates application support for Windows Vista -->      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>      <!--The ID below indicates application support for Windows 7 -->      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>      <!--The ID below indicates application support for Windows 8 -->      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>       <!--The ID below indicates application support for Windows 8.1 -->      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>       <!--The ID below indicates application support for Windows 10 -->       <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>    </application>  </compatibility>

    My app check with that manifest in force produces a minor version of 3.

     

    Fun stuff... :S

     

    Edit: And here's what GetVersionEx is deprecated in favor of.  Looks pretty easy to implement.  Edit again: I updated the manifest above for Windows 10 compatibility.

  18. The VC++ error workaround is included in the readme files in the zip file with the binaries in it, as well as the runtime installers. The GWX update, as far as I know, doesn't affect Windows 8.0, only 8.1, which is NT 6.3 not NT 6.2. If you have the GWX installer in Windows 8.0, please let me know.

     

    Mine (Win 8.1 fully patched) returns 2 as a minor version (I know, I checked it myself).

     

    As for your MessageBox problem, it happening seems to indicate that some of your app messages aren't being processed.  Most Google responses point to WM_PAINT as the culprit, but I don't see a main message pump loop and don't have VC++ to play with here, so hopefully that gives a direction to look.

×
×
  • Create New...