"COM Surrogate stopped working" error - com

How can I fix the error "COM Surrogate stopped working" in Windows Vista Business?

Right click My Computer, select
Properties - select Advanced System
Settings from the left side pane -
In the Performance box, Click
Settings - Click Data Execution
Prevention tab.
Check the "Turn on DEP for all
programs and services except those I
select" option - Click "Add".
A navigation box opens, navigate to
C:\WINDOWS\system32\dllhost.exe,
Click it to add and hit OK.
This should now add this "Com
Surrogate", with a checked box, into
the list area, OK out, reboot and
you're done. The Com Surrogate errors
should disappear
Taken from here

This process nowadays is often caused by the trojan. Check your PC with anti-malware. These intruders got smart and tend to disguise their malicious activity behind these common exe processes, in this case, Dllhost.exe. check in which folder this file is and maybe update the program or drivers it is linked to. It may be an outdated software issue too.

Related

Visual Studio 2022 opening Bing.com on Shift-F12

I have a new installation of VS2022 (Current). If I right click on some C# code it will show "Find All References (Shift-F12)". Clicking on it will work. However, if I actually press Shift-F12, it will open an embedded browser window pointing to www.bing.com. If I go to Tools/Options/Keyboard, select "Press Shortcut Keys" and press Shift-F12 it opens up the windows search screen rather than telling me what it's bound to within VS2022.
Any ideas how to diagnose or, preferable, stop this behaviour and revert to Shift-F12 doing "Find All References"?
So the answer to this one is on the weird side. Turns out I started using a bluetooth keyboard on the same day as starting to use Visual Studio 2022. The bluetooth keyboard treats the function keys as meta commands whilst the laptop keyboard does not. F12, of course, is "Open Search". To complicate matters, it turns out that Visual Studio 2022 intercepts this command. Whilst normally it opens up the Windows Search window, while in VS2022 in regular mode it instead starts an embedded web browser within Visual Studio. Not sure why you'd want that behaviour, but it does it.
The solution is to reconfigure your bluetooth keyboard.

Close access navigation pane even if there is no search result

When starting our vba-access-application (which is done by a VBE-add-in which starts a VBA-function) we used to close the navigation-pane with this code:
DoCmd.SelectObject acMacro, "Autoexec", True
DoCmd.RunCommand acCmdWindowHide
As I started to use the built-in search/filter bar inside the navigation-pane, this code did not work anymore when the macro "Autoexec" is not visible. So I changed it to:
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
This seems to work fine as long as there are any search results left. When I write "nothing with that name" inside the search bar(=the filter), the navigation pane will not close.
Does anyone know a way to close the navigation pane even if there is no search result visible?
DoCmd.NavigateTo "acNavigationCategoryModifiedDate"
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
In order for the command DoCmd.RunCommand acCmdWindowHide to successfully close the Navigation Pane, the Navigation Pane must have the focus. But for an Access window to have the focus, a control within the window must have focus. It turns out that the NavigateTo command will never place the focus in the Search textbox, so if the search results are blank and there is nothing to select, then focus will not change to the Navigation Pane (even though technically the Navigation Pane's selected group may have been updated.)
If you play with the Navigation Pane long enough, you'll find that the Navigation search results and textbox are reset when switching between the highest-level Navigation categories. Hence my suggested code... it changes between two Navigation categories so that the search results are cleared during that action, so that the Navigation window will eventually gain focus when one of its listed objects finally gets focus.
(Really, using the NavigateTo command in this case is just a stupid trick to place focus on the Navigation Pane. It's just another glaring deficiency of the Access interface that there is no direct commands/objects for controlling the Navigation Pane.)
I suggest you don't write any code—but just use the built in Access settings to prevent (hide) the nav pane.
So work, then you hold down the shift key during startup.
(shift key by-pass).
The shift key development dance:
You will find that you can launch + develop a lot of code and work on forms/reports without having to exit.
However, you STILL will have done a shift key start-up bypass. The reason of course is that on start up, you code may well hide the ribbon. (Or launch a custom one). Same goes for start-up form—it may run a bunch of code, ask for logon, check table links.
And then there is the start-up settings you have. You likely have a start-up form (you don’t want that running). You likely have un-checked the display nav pane, but you need this during development. And what about if you have a custom ribbon? (Again a setting in tools→options). And use special keys—again turned off for users, but REQUIRED for developers.
And then there is the auto keys macro. This is used to re-purpose the F1 key (help—either disable or launch your own custom help—say a pdf or word file).
And any re-purpose such as say an f12 to popup some custom search box etc.
So, all of these custom setup is going to be rather LARGE amount of settings. Many will be from tools→options (main form, ribbon, etc.). And some will be from your code.
You REALLY (but REALLY) can’t code out all of these settings, and some require a re-start anyway. In a typical application there really going to be a lot of settings that are changed for your users vs you as the developer.
On start-up you thus hold down shift key. This will not only prevent your start up code from running, but ALSO your start up settings – even things like nav pane, and especially the tools→settings area (shift key ignores most of those settings).
So during a day of development, I will do this shift key dance all day long.
However, there are two tricks and shortcuts you can use here that will minimize this exit + re-enter down to a dull roar.
One great tick is to always place a custom compact repair button on the QAT. So QAT button is now ONE mouse click and always available to you. So if I am working on a form in design mode, flipping into view mode will often suffice, but in those cases where I need a full exit + re-start to test? I don’t even save the form, I just do a quick simple one click on that QAT compact + repair button.
One click! (Might have to answer yes to save). At this point, the application will re-start without you having to exit. And you don’t hold down the shift key—so all your start up settings run. You now flipped into user test mode, and it only took ONE mouse click.
This allows you to flip from developer mode and into “user test” mode with ease and only one mouse click.
So you can now run your application as it will appear to the end user.
To flip back into developer mode, just one simple click on your custom C+R button. (And you HOLD down shift key). This will flip you back into developer mode (you nav pane, your function keys, everything and all those start up settings are now ignored – you are free to develop without all those hassles and issues in your way). Full wide open use of Access as if no settings at all occurred.
And as noted, you get a c+r to boot, and you need + want to do that multiple times during the day anyway.
And as noted, for a good many changes, you not have to do this flip and can stay in developer mode.
Of course in some cases your “user mode” will REALLY lock down the Access and thus you have to exit (you lose the QAT trick). So you often be able to jump from developer to user, but not back the other way. Again, you not have to run + test everything in user mode all the time, but often some global variables, start up, password stuff will force this issue on you.
So, in this case?
I use a quick hit of alt+f4 to exit the application. AT this point, the accDB file should STILL be highlighted in the windows explorer. So, now it just a quick tap of the enter key to re-launch the accDB. And if wanting “user mode”, then simply don’t hold down the shift key. Do some testing, now alt+f4, and then a simple quick tap of the enter key (we back to the windows file explore and that accDB file is highlight). However, this time you WILL hold down the shift key, and thus you now back into developer mode.
And often, I will call my start up code before testing.
Ctrl+g (jumps to debug window), type in MyStartup
(MyStartup is assumed to be your first start up routine that does all that setup and THEN launches the main form – so in some applications I don’t use the built in start-up form setting, but use the autoexec macro to call my main start up routine (MyStartup)
So in a good many cases, I don’t have to exit Access to flip into test mode.
And of course some reports and forms can be used, viewed, developed on without having to full run the application with all that “user” start-up code stuff.
So some report might work, but then again it may well require some form to be open for it to work. (Or a system wide function and company name setting may be required + set in your start up code). So how badly you need to exit vs that of being able to do “some” development will often vary here.
So I will say that often I am forced to exit + re-load the application (alt+f4, tap enter key). So it only really 2 key combo to exit out and re-load/re-enter Access.
At the end of the day, if you can’t use that QAT shortcut suggestion, then you will exit + re-enter MANY MANY times during the day.
As noted, for a good number of forms etc., then you can flip between view and design mode. (But you of course be running access without all that start up crap stuff that prevents you the developer from working).
The simple matter is at the end of the day, there is going to be FAR MORE settings then just the nav pane (or lack of) that going to mess up your development process. So, the above shift key dance and QAT suggestion ALSO solves all of the OTHER many settings, and does so without you having to write one line of code to deal with this issue.
Of course, once all is working, then you will compile the application down to an accDE. And then apply the shift key by-pass code to that to lock the application further down.

Show Networks Flyout (the "connect-to-network" thingie) without explorer.exe running

Requirements:
Our application replaces the usual windows shell (explorer.exe). This is a product requirement for a closed system that we're supplying.
We oughtta let the user select a wi-fi network and connect to it.
The problem: The wi-fi networks dialog only shows up when explorer.exe is running
What we tried:
Write our own wi-fi manager that uses wlan API. It lists connectible networks and allows the user to connect/disconnect. Problem: too many network types/configuratons that have to be tested, especially when the wheel has already been invented and reinvented all over.
Try and check how is the networks dialog implemented. It appears that it's and undocumented COM interface (IUIRAdioManager). Problem: it's undocumented, so no API
Use an existing network manager, for instance the one that comes with the driver. Problems: it's ugly, not to the product's taste; and it opens too many options for the user, like creating and loading profiles, browsing for files on a file system - these things are unacceptable.
Running explorer.exe just for the purpose of showing the networks dialog and then killing it. Problem: once we run explorer.exe - it pops up metro view and hides our fullscreen application or shows the taskbar.
The latter seems like the preferred solution: no need to reinvent the wheel, it does what's needed. Just gotta make explorer.exe not pop out, keep it quiet in the background.
So, we're down to two options:
How to show the networks flyout dialog without explorer.exe?
How to run explorer.exe without it popping out metro or taskbar above our application?
Your first solution would be incredibly difficult to implement. I am almost certain that the Networks window is dependent on explorer.
However, your second is entirely possible.
To hide the taskbar, you will need to find a window (using FindWindowEx) to find the taskbar (name is Shell_traywnd). This will hide the taskbar and start button. EDIT: Unless you are implementing your own taskbar, you might want to set the taskbar to autohide.
Next you will need to hide all of the metro programs. In a similar fashion as above, find the class named EdgeUiInputWndClass and close it. You should be able to get the process name of it and then kill the process.
Windows key. This is a little more difficult. You will probably need to use a program and delete the key or a keyboard hook (a low level keyboard hook) and just ignore key presses with the same scancode as the windows key. Left Windows is 0x5b and Right is 0x5c (source). Note that this will not block Ctrl+Alt+Del.
Finally, to show the Flyout, you can run %windir%\explorer.exe shell:::{38A98528-6CBF-4CA9-8DC0-B1E1D10F7B1B}
(source).
EDIT2:
You should also be able to hide toast notifications via this
Of course, I don't see why you cannot just use Windows 8/8.1 and put the app in kiosk mode.

SSMS SQL SERVER Management Studio 2012 startup freeze

I have a strange situation. IT installed SSMS on my laptop and it runs well the first time, connected to my SQL servers remotely etc. But then it's frozen. I forced quit and then started SSMS again. Now it's totally frozen, no popup window at all to enter the server-connection text string. Then I did a force quit and got a pop up window (see it here ).
Microsoft SQL Server Management Studio has detected that an operation is blocking user input. This can be caused by an active modal dialog or a task that needs to block user interaction. Would you like to shut down anyway?
Has anyone seen this before? My IT department has no clue.
Often this is due to the new connection dialog being off screen (usually due to changing monitor setup e.g. 1 to 2 monitors or resolution change etc).
If so the really easy fix (if your connection dialog just needed approval without changing fields) is :
Focus on SSMS and Hit Enter/Return
..or the easy fix (if above does not work - as your last connection is not ready to go) is:
Alt Tab to SSMS
Alt + Space - context menu
M - select Move (in offscreen context menu)
Arrow Key(s) - to move it back onto screen
As per answers here from #Eirik Toft and here from #Lee Chetwynd
Fixed an issue which presented the same on my machine today by renaming a entry in my registry:
After some digging there seems to be multiple issues that can produce the same error (Application, settings, registry). This blog entry covers it pretty well:
http://www.armedia.com/blog/2012/08/sql-server-management-studio-freeze/
In my case deleteing the SQL server management studio folder under AppData ( c:\users\%userName%Appdata\raoming\microsoft\ ) didn't work.
However I was successfully after deleting / renaming the regisitry entry:
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server]
(update)
Worked out the underlying issue on my laptop - was using additional 2 screens with much higher resolutions which caused windows / SSMS to open up the connect to new data source dialog off all of them. If your using multiple screens try returning to just use the native laptop screen to see if you can find the dialog that SSMS is waiting on your input for.
I just had this same situation, with two additional screens connected to my laptop. SQL Server Management Studio was opened on the third screen, with the modal dialog nowhere to be seen.
Two options:
Press tab three times and enter. This cancels the dialog. Now you can move the window to another screen.
Set Windows to only use one or two screens. SSMS opens on the first and should still open there when you move back to using three screens.
When SSMS is on your primary or secondary screen, the modal dialog opens on the first and should be usable.
It was because multi screen display. Turning off multiscreen to single one resolved it. Reenabled multi screen display after ssms started working
In my case, "Run as Administrator" option worked like charm. I was accessing my server screen with the windows RDP. And when I open SQL Server Management Studio and Visual Studio 2010 user hangs at the moment and wont operate unless sign off r disconnected by administrator.
But when I set compatibility mode of both the application to the "run as Administrator", it starts working fine.
the problem also occurs if you have a touch screen. I fixed this by disabling the local thouch screen when I switch to RDP.

Squeak System Browser Questions

I am using (a school modified version of) the "Squeak By Example" (SBE) image for a OOP/OOD class. However, my System Browser is missing a few features that appear in SBE. I assume there are some configuration options that can get them back for me, but I can't find them yet.
My questions are:
1) How do I get the buttons back? In the bottom pane there should be a bunch of button (browse, senders, implementors, versions, ..., source). My buttons are missing.
2) How do I get the small workspace area above the buttons to appear? There is supposed to be an area that I can type in, below the top panes, and above the buttons, but it doesn't appear.
Thanks in advance!
Robert
Edit - I did fool around in the Preferences Browser and tried a lot of settings. I managed to make the buttons come back and then later got that small (unknown name) workspace pane back, but I have no idea how. I have tried to systematically turn stuff off again to find out what setting(s) controlled what, but I was unable to determine what controlled either problem. So even though I have it working, I would like some squeak/smalltalk knowledgeable person to let me know how to control these as it might help me learn...
"In the bottom pane there should be a bunch of button (browse, senders, implementors, versions, ..., source). " -- switch on the optionalButtons preference in the preferences browser.
The "area that I can type in, below the top panes, and above the buttons, but it doesn't appear" sounds like the annotation pane - this gives you summary information about the method you're currently viewing, and it's controlled by the annotationPanes preference. Alternatively you may be referring to the Mercury Panel which is used for fast navigation to other classes and methods; this is (of course :-) controlled by the mercuryPanel preference.
If you've been messing around, you may also find that you now have an incorrect system browser selected. Squeak has a choice of browsers which can act as the System Browser. You can choose between them by clicking the menu button on the System Browser and selecting "Choose new default Browser". Open a new browser window to see what effect this has had.
You may also want to try a Pharo image which has everything configured the way you want by default.
Do you have access to the Preferences Browser? It should be in the main system menu. You can alter all sorts of things via this browser, including which buttons appear in teh system browser?