Dev Studio BookMark Saver Add-In


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Jump to what's new (updated on 21 June 1999)

Overview of the Add-In:

The feature to set bookmarks (using Ctrl-F2) in a text file available in the Dev Studio editor is very useful when going through a HUGE source file. The drawback is that, once the text file is closed you lose all the bookmarks set in that particular file and it's a pain to set them all again.

So, anyway I guess you know what this add-in does by now. It, remembers the bookmarks set in a file (as shown below) and re-sets them back if the file is opened later in Dev Studio.


  • Copy the bookmark.dll file (after downloading it of course) where-ever you want (I put them in Devstudio\sharedide\AddIns).
  • In, DevStudio, go to the Tools menu and select Customize...
  • Go to the last tab (Add-Ins and macro Files). You should be able to see the Book Mark add-in in the list box (if you saved it in the path above. If you've saved it in a different path, you'll have to browse for it yourself). Once, you checked the bookmark add-in, click close.
  • You will now be presented with a dialog box asking you to choose a folder to store the bookmarks. Choosing any directory will work fine. Clicking cancel will however unload the bookmark add-in. You will only be asked to specify this folder once.


The add-in runs without user interaction.

You do have a choice to set the options. You can enable or disable the bookmark add-in on the fly (by choosing the Bookmark command which brings up the dialog box as shown below).


Disabling the bookmark add-in will not restore your bookmarks the next time you open the file.

The user also has the option of saving the bookmark locations

  1. When user closes a document OR
  2. When user saves a document (for the paranoid, like myself who thinks that DevStudio will crash anytime for any reason)

The delete file button simply purges any bookmark locations that you might have accumulated during your long hours of coding


The first version of the add-in was quite inflexible in the manner that the user couldn't selectively remove bookmark locations stored in the file. Well, now the user can selectively remove a line or the whole file. I'll let you play around with the add-in.


Un-check the bookmark add in (in the tools customize page). Delete the bookmark.dll and also, a file called bookmark.dat (which is automatically created by the add-in) which is stored where the user specifies.

Personal Note:

Thank you to everyone who is using this add-in and for the time taken to e-mail me with useful comments and suggestions.

Update: (4th September 1998)

Now the users can remove files or lines in the advanced page with the use of the keyboard. Just press the delete key. The user can also open any file by using the F3 key. Double clicking on the line number will open the file and scroll to the line number and highlight the line to give you an indication as to where the bookmark is set. F3 works with both Files and Line numbers.

Update: (2nd December 1998)

DevStudio process did not seem to terminate itself properly when users would open a file from the dialog box (using the F3 key or choosing the menu option available). I don't know why this seems to happen, so to prevent from DevStudio's process not terminating properly, I have removed the functionality whereby the user can open a file until I find out exactly why this happens.

Update: (26th January 1999)

Bug fixes:

Could not delete files from the list (in the advanced page) which did not exist on the drive. (Thanks to Matthew Ellis for finding the bug) This is now fixed.


When navigating code using the browse facility, the add-in would remove the highlighted piece of code, regardless of whether there was a bookmark set for that file or not. (Thanks to Matthew Ellis for the suggestion)

Functionality of opening a file from the advanced page has been re-introduced once again. I did not seem to find anything wrong after endless hours of painful debugging. F3 key should now work again.

Update: (14th June 1999)

Bug fixes:

Fixed a real nasty bug, that had been around from day 1 (sorry people). A lot of people experienced this bug and now it's finally fixed. The bug was that, after opening a file from the advanced tab and then trying to shut down DevStudio (V5 or V6), DevStudio wouldn't shut down properly.

Thanks to Jeff Rockwell for bugging me from day 1 to track it down and Itay Szekely who recently brought it to my attention.

Again, I am really sorry this has been around for so long and only just fixed, but I RARELY spend time on this add-in.

Known Issues:

There is one problem (actually it's a minor annoyance). Every time, the user hits save, the editor will scroll. The cursor will remain at the same place but the text scrolls (which can sometimes dis-orient users). There doesn't seem to be any good way of achieving this. :-(


This add-in has been tested under Windows 95/NT and works for VC5. It has also been tested under Windows 95/NT running VC6 and it seems to be running. If however you have a problem please let me know.


Download the latest version of the bookmark add-in. (V2.1)

If you have any questions, comments or suggestions on how to improve this please let me know. jigneshpatel@hotmail.com



  • Source code can be found here

    Posted by Legacy on 02/15/2001 08:00am

    Originally posted by: Gabe Martin


    From here you can download the source files

  • Is it just me, or there is no SOURCE CODE provided?...

    Posted by Legacy on 06/28/1999 07:00am

    Originally posted by: George

    Could you provide the source code...?

    Best Regards

  • Problems registering addin withour Administrator privilegies

    Posted by Legacy on 06/24/1999 07:00am

    Originally posted by: Richard Boesiger

    Problems registering addin withour Administrator privilegies

    As a non administrator, it's not possible to register the addin. This is caused by the default access REGSAM of CRegKey used by ATL (ATLBASE.H)
    See Microsofts Article Q190686. Following is a short extract of this article:
    BUG: ATL Server Registration May Fail for Non-Administrators
    The information in this article applies to:
    The Microsoft Active Template Library (ATL), versions 2.1, 3.0 included with:
    - Microsoft Visual C++, 32-bit Editions, versions 5.0, 6.0

    Registration or unregistration of ATL servers may fail on a machine if the logged-on user doesn't have appropriate registry access rights. In-process servers may fail and display the following message:

    DllRegisterServer in projectname.dll failed. Return code was:

    Debug EXE servers, linked statically to the registrar code and run in the debugger, may display the following trace messages:

    Failed to register, cleaning up!
    The thread 0xnn has exited with code -2147352567 (0x80020009).

    CRegKey is a class used by ATL for manipulating the registry. It's Open() and Create() methods have a REGSAM argument that specifies the security access to the particular registry key.

    The REGSAM argument defaults to KEY_ALL_ACCESS. In several places in the ATL code, Open() and Create() are called without specifying the REGSAM, which means it defaults to KEY_ALL_ACCESS. KEY_ALL_ACCESS is a combination of other flags including WRITE_DAC and WRITE_OWNER.

    For a non-administrator, you may not have WRITE_DAC and WRITE_OWNER permissions, which causes registration to fail.

    In ATLBASE.H, change the default REGSAM for CRegKey::Create() and CRegKey::Open() to KEY_READ|KEY_WRITE:

    class CRegKey
    LONG Create(HKEY hKeyParent, LPCTSTR lpszKeyName, LPTSTR lpszClass =
    REGSAM samDesired = KEY_READ | KEY_WRITE, // changed REGSAM
    LPDWORD lpdwDisposition = NULL);
    LONG Open(HKEY hKeyParent, LPCTSTR lpszKeyName,
    REGSAM samDesired = KEY_READ | KEY_WRITE); // changed REGSAM

    You need to link statically to the registrar. Building for ReleaseMinDependency will statically link to the registrar. Debug builds link dynamically to the registrar via Atl.dll. You need to add _ATL_STATIC_REGISTRY to the list of Preprocessor definitions. You can do this on the Project menu by clicking Settings. Click the C/C++ tab and select General under Category.


    This problem concerns most of the addins offered here and on other www pages.

    Nevertheless, I like this addin, Thank You for this great job.


  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date