ah well, I thought I could find a way around the problem but you pretty much confirmed what I was thinking. thanks,
paulb
Posts
-
Failed to load provider type -
Failed to load provider typeI'm getting an exception thrown when trying to use a 3rd party library from my DLL, it works fine if I use this library from an Exe but not the DLL. I suspect its to do with it trying to access a config file. This is (part of) the stack trace:
Inner Exception: Failed to load provider type: ERSP.Utilities.Configuration.LocalFileModuleSettingsProvider, xFx, Version=2.1.2868.1848, Culture=neutral, PublicKeyToken=null. (ConfigurationErrorsException) Stack: at System.Configuration.ApplicationSettingsBase.get_Initializer() at System.Configuration.ApplicationSettingsBase.CreateSetting(PropertyInfo propInfo) at System.Configuration.ApplicationSettingsBase.EnsureInitialized() at System.Configuration.ApplicationSettingsBase.get_Context() at System.Configuration.ApplicationSettingsBase.set_SettingsKey(String value) at xFx.Properties.Settings..ctor() at xFx.Properties.Settings..cctor()
It looks like its using a custom configuration provider, maybe its just buggy? and maybe it will work if the config file is avialble so... Is it possible to have an app.config file with a DLL? I tried adding one to the project, didn't seem to help. -
How to override CWinDataExchangethis is my added code (I am trying to implement a DDX_CBSTRING function ala MFC): (in my atlddx2.h)
namespace WTL
{#define DDX_CBSTRING(nID, var) \
if(nCtlID == (UINT)-1 || nCtlID == nID) \
{ \
if(!DDX_CBString(nID, var, sizeof(var), bSaveAndValidate)) \
return FALSE; \
}template <class T>
class CWinDataExchangeEx : public CWinDataExchange<T>BOOL DDX\_CBString(UINT nID, \_CSTRING\_NS::CString& value, int /\*cbSize\*/, BOOL bSave /\*, BOOL bValidate = FALSE\*, int nLength = 0\*/) { // implementation here..... }
};
}; // namespace WTL
then on the dialog class:
#include "atlddx2.h"
class CScaleEditDlg :
public CDialogImpl<CScaleEditDlg>,
public CWinDataExchangeEx<CScaleEditDlg>
{
// .....
BEGIN_DDX_MAP(CScaleEditDlg)
DDX_CBSTRING(IDC_SCALE_MODEL, m_strModel)
DDX_TEXT(IDC_SCALE_DESCRIPTION, m_strDescription)
DDX_INT_RANGE(IDC_SCALE_SA, m_nStationAddress, 0, 999)
DDX_CONTROL_HANDLE(IDC_SCALE_IMAGE, m_ctlImage)
END_DDX_MAP()};
None of the base class DDX routines seem to get called, e.g. DDX_TEXT, DDX_INT_RANGE, etc. I set breakpoints in DDX_Text() and all others but only the DDX_CBString one gets hit. Could it have something to do with the way the macro's are defined? They are defined within a function body: (from atlddx.h)
// DDX map macros
#define BEGIN_DDX_MAP(thisClass) \
BOOL DoDataExchange(BOOL bSaveAndValidate = FALSE, UINT nCtlID = (UINT)-1) \
{ \
bSaveAndValidate; \
nCtlID;#define DDX_TEXT(nID, var) \
if(nCtlID == (UINT)-1 || nCtlID == nID) \
{ \
if(!DDX_Text(nID, var, sizeof(var), bSaveAndValidate)) \
return FALSE; \
}
// .... -
How to override CWinDataExchangeI tried this:
template class CWinDataExchangeEx :
public CWinDataExchange
{
public:
// my new DDX functions here...Then I have the dialog class is derived from CWinDataExchangeEx. But now none of the base class DDX routines get called anymore, only my new one's in the Ex class?!
-
Moving VC7 app to VC8We have several VC7 MFC and ATL applications and are wondering whether to port them over to VC8. The main reason is so that we don't have a mix of development environments - some projects using vs2003 and some using vs2005. But are there any advantages as far as the libraries go - STL/ATL/MFC? I understand the main change is in the C runtime string functions to reduce buffer overflow problems. Any other changes for better or worse?
-
Datamax 2020Did you actually type in "datamax 2020" into Google or just mash the keyboard at random?
-
Mars mission astronauts will need to be farmers too...well if you think about it we already are eating our own poop and pee. Planet Earth is one big recycling machine, its not like human waste just vanishes into thin air. In fact you may right at this minute be eating a few molecules of a turd Jesus Christ laid down 2000 years ago :-)
-
Paperless office Paper (Redundant) People ProblemsI blame old age and technofear It's mostly the old fogies where I work who print off every email they get. The other (smaller) group are those unfamiliar with PC's and either they dont trust the PC with their info or just dont know how to do certain things (like forward that email to someone instead of printing it and then walking over to the office to hand it to them). This second group can contain people in their 20's or younger, which always suprises me.
-
Communicate across application instancesI need to send a signal from one instance of my application to another. What would be the best method to do this? In Win32 I would use a named event and have a listening thread to pick up when that event gets signalled. But named events dont seem to be available in .NET 1.1
-
Uninstall without Add/Remove program wizardrun this: msiexec /x msde.msi
-
[Message Deleted]:-D I hate abbreviations. Couldn't you have made it [Message Deleted] its only 4 extra letters.
-
Speaking of gas prices...You live 3.4 miles from work and you drive in?! There's the problem with the USA's huge oil consumption right there.
-
IronyDavid Wulff wrote: And does my bank offer out-of-hours deposits? Of course not. What?! :omg: do you live in the 3rd world? Every bank here allows deposits through ATM's
-
Oh CackDisgusting Stupid trigger happy cops and then outright lies published in the media to try to cover it up.
-
version numberingthats a very good idea, thanks! I have always just automatically given them both the same version numbers, without actually thinking about why there are two different fields.
-
version numberingif you have several projects in a solution that all compile to individual EXE's what do you do with version numbers?... keep them all in line with each other or have each EXE with its own independent version number?
-
Fish Storypoor thing. why cant they just leave them in the ocean
-
Finally... Something to look foreward to in Longhornhow is that MYxaml project of yours going by the way? :)
-
Rider stylethat last one looks like it could have crushed a few people :~
-
They're Baaaaacccckkkk...grown men with the mental age of five year olds on bikes that are about as roadworthy as a shopping trolley I hate those things. As soon as anyone buys a Harley the first thing they do is remove the muffler to make it sound "cool"... WHICH IS ILLEGAL (in my country anyway) but the cops dont do a thing I would go on vacation if I were you