The Artima Developer Community
Sponsored Link

C++ Community News Forum
STLSoft libraries v1.9.1 beta 1 released

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Matthew Wilson

Posts: 145
Nickname: bigboy
Registered: Jun, 2004

STLSoft libraries v1.9.1 beta 1 released Posted: Dec 20, 2005 9:09 AM
Reply to this message Reply
Summary
This is a beta preview of version 1.9.1 of the STLSoft libraries, incorporating a considerable number of changes from the 1.8.x versions. Notable new additions are STL-compatible adaptors for MFC CArrays, new iterator classes, and dl_call(): extremely powerful Dynamic Library Function invocation for UNIX and Windows.
Advertisement


There are lots of bug fixes, changes to the directory structures, enhanced unit-tests, and so on. The new additions are:
  • stlsoft::ostream_iterator, offering enhanced functionality over std::ostream_iterator
  • stlsoft::transform_iterator
  • COMSTL stream functions
  • MFCSTL CArray class and instance adaptors
  • PlatformSTL environment_map
  • WinSTL console functions
and, the most interesting, the introduction of:
    the dl_call() functions for the UNIXSTL and WinSTL libraries.

dl_call() allows dynamic library functions to be invoked in a natural, single-statement form. It is efficient, it supports between 0 and 32 parameters, it is exception-safe, it uses compile-time constraints to ensure that arguments are of POD types, it handles different calling conventions. A dynamic function is invoked by passing the library identifier, the function identifier and all the arguments that you would use to invoke the function if it was statically linked. For example, invoking the Win32 function EnumProcesses() by static linking would look like the following:

DWORD pids[100];
DWORD cbRetrieved;
BOOL bSuccess = ::EnumProcesses(&pids[0], sizeof(pids), &cbRetrieved);

EnumProcesses() has the stdcall calling convention, and resides in PSAPI.DLL. To invoke it dynamically, using dl_call(), would be as follows:

DWORD pids[100];
DWORD cbRetrieved;
BOOL bSuccess = winstl::dl_call("PSAPI", "stdcall:EnumProcesses", &pids[0], sizeof(pids), &cbRetrieved);

or:

DWORD pids[100];
DWORD cbRetrieved;
HINSTANCE hinst = ::LoadLibrary("PSAPI.DLL");
BOOL bSuccess = winstl::dl_call(hinst, "stdcall:EnumProcesses", &pids[0], sizeof(pids), &cbRetrieved);

It is flexible, since it allows the library identifier to be an HINSTANCE or any string type (e.g. char const*, std::string, etc.), and the function identifier to be any string type.

Download the all these goodies and more at http://stlsoft.org/downloads.html#stlsoft_1_9_1b1

Topic: recls 1.7.1 released Previous Topic   Next Topic Topic: McObject Integrates eXtremeDB with I-Logix’s Rhapsody MDD Environment

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use