Tim
Tue May 03 19:27:51 CDT 2005
Ok - so my one process only takes up 1 of the 32 system slots, but each dll
I load takes up 32M of memory even if it doesn't really require that much.
So I could also keep an eye of available memory during these situations,
short of building the debug os. The 2-copies is very unlikely (famous last
words) since I can do a hard-reset and full install of my cab file and still
get the problem so I'm pretty sure there's only a single copy. Thanks very
much for the pointers, I'll keep at it.
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:ek2CnD$TFHA.544@TK2MSFTNGP15.phx.gbl...
> No, if it's on two lines, there are two strings in the value. Each is
> searched as a complete path. The presence of the \Release folder, though,
> suggests that you are running the driver I mentioned last time. I'd try
> removing that, in the interest of having as few wildcards running around
> as possible.
>
> There are a variety of limitations: 32 process slots (but DLLs don't take
> up slots; processes do). Each process gets 32MB of memory space and, if
> you are loading a lot of DLLs, it's just possible that you're running out
> somehow. You really need to build a DEBUG OS, it sounds like, and read
> the debug output messages when the error occurs. I think there's a
> reasonable chance that doing so would tell you what's going on.
>
> As far as missing method exceptions, it might mean that there are two
> copies of a target DLL floating around and they don't have the same set of
> exports. Sometimes you get DLL #1 and all is well, while other times you
> get DLL #2 and you get the exception.
>
> Paul T.
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:u9qbrl7TFHA.616@TK2MSFTNGP12.phx.gbl...
>>I saw it on 2 lines, as in:
>>
>> \Release\
>> \Storage\Windows\
>>
>>
>> Maybe that's really parsed as 3 places to look for dlls - \Release, then
>> \Storage, and finally \Windows? I do also see this in the registry re:
>> SFD:
>>
>>
>> [HKEY_LOCAL_MACHINE\System\Events]
>> "SYSTEM/ShellAPIReady"=""
>> "SYSTEM/PowerManagerReady"="Power Manager APIs"
>> "SYSTEM/GweApiSetReady"="Event triggered after GWES registers its API
>> sets"
>> "ReleaseFSD"="ReleaseFSD"
>>
>> Another clue - at the times I get the missingmethod exception, I run a
>> very small test app that tries to use the same dll. And it works. So
>> now I'm wondering if my much larger app, which uses maybe 10-12 other
>> dlls I know about directly, plus who knows how many others in due course,
>> is suffering not from an inability to find the dll, but an inability to
>> load it.
>>
>> Is there some dll-count limit I may be exceeding? I seem to recall
>> something about a 32-slot process limit. I notice this happens more
>> often but not exclusively when I utilize the CDMA phone to make the web
>> connections my code requires. Maybe all tolled I've simply got too much
>> going on? Could the MMEx be cause by something like that?
>>
>> --
>>
>> Tim Johnson
>> High Point Software, Inc.
>> www.high-point.com
>> (503) 312-8625
>>
>>
>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
>> wrote in message news:OznhiJzTFHA.2812@TK2MSFTNGP09.phx.gbl...
>>> Remember that it's a multi-string value, not just a single string. Did
>>> you double-click the value name in Remote Registry Editor and verify
>>> that only the one path is there (you can't just look at it in the main
>>> display; that only shows the first entry)? The fact that \Release is
>>> there suggests that you're running the RelFsd driver (allowing a
>>> Platform Builder system to treat files in the flat release directory as
>>> though they were on the device), or something. You might double-check
>>> that...
>>>
>>> Paul T.
>>>
>>> "Tim Johnson" <tjohnson@high-point.com> wrote in message
>>> news:eY1yG4QTFHA.3652@TK2MSFTNGP15.phx.gbl...
>>>> When it fails and I look there I see this value for SystemPath:
>>>>
>>>> "\Release\Storage\Windows".
>>>>
>>>> Does that seem strange to anyone? Clearly my dll is not there!
>>>>
>>>> Tim Johnson
>>>> High Point Software, Inc.
>>>> www.high-point.com
>>>> (503) 312-8625
>>>>
>>>>
>>>> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT
>>>> com> wrote in message news:OufV7gATFHA.3840@tk2msftngp13.phx.gbl...
>>>>> It almost sounds like the loader is having its search path changed by
>>>>> something during execution. You might check
>>>>> HKEY_LOCAL_MACHINE\Loader\SystemPath after install of the DLL and then
>>>>> when it fails and just see if it changed (note that it's a
>>>>> multi-string item, so you have to open it in Remote Registry Editor to
>>>>> see all of the entries).
>>>>>
>>>>> Paul T.
>>>>>
>>>>> "Alex Feinman [MVP]" <public_news@alexfeinman.com> wrote in message
>>>>> news:eDqp2bATFHA.3344@TK2MSFTNGP12.phx.gbl...
>>>>>> Actually it sounds like it might. Is it possible to rename it and try
>>>>>> like that?
>>>>>>
>>>>>> --
>>>>>> Alex Feinman
>>>>>> ---
>>>>>> Visit
http://www.opennetcf.org
>>>>>> "Tim Johnson" <tjohnson@high-point.com> wrote in message
>>>>>> news:uuiYdS$SFHA.560@TK2MSFTNGP10.phx.gbl...
>>>>>>> DllImport("BTAccess.dll"). Not likely it's duplicated anywhere.
>>>>>>> The frustrating thing is it works for a while, then suddenly the OS
>>>>>>> can't find it unless I reset.
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Tim Johnson
>>>>>>> High Point Software, Inc.
>>>>>>> www.high-point.com
>>>>>>> (503) 312-8625
>>>>>>>
>>>>>>>
>>>>>>> "Peter Foot [MVP]" <feedback@nospam-inthehand.com> wrote in message
>>>>>>> news:OMACP87SFHA.2556@TK2MSFTNGP12.phx.gbl...
>>>>>>>> Out of interest what is the name of the dll, does it have the same
>>>>>>>> name as another dll or exe on the device?
>>>>>>>>
>>>>>>>> Peter
>>>>>>>>
>>>>>>>> --
>>>>>>>> Peter Foot
>>>>>>>> Windows Embedded MVP
>>>>>>>>
http://www.inthehand.com |
http://www.peterfoot.net |
>>>>>>>>
http://www.opennetcf.org
>>>>>>>>
>>>>>>>> "Tim Johnson" <tjohnson@high-point.com> wrote in message
>>>>>>>> news:eqPfxi5SFHA.2128@TK2MSFTNGP15.phx.gbl...
>>>>>>>>> Nope, just the one. It starts out being accessible via pInvoke,
>>>>>>>>> then sometime during extended execution, or with another launch of
>>>>>>>>> the app later, I start getting MMEx.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Tim Johnson
>>>>>>>>> High Point Software, Inc.
>>>>>>>>> www.high-point.com
>>>>>>>>> (503) 312-8625
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> "Alex Feinman [MVP]" <public_news@alexfeinman.com> wrote in
>>>>>>>>> message news:uvaV0J5SFHA.3280@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>> Do you perhaps have an identically named DLL elsewhere?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Alex Feinman
>>>>>>>>>> ---
>>>>>>>>>> Visit
http://www.opennetcf.org
>>>>>>>>>> "Tim Johnson" <tjohnson@high-point.com> wrote in message
>>>>>>>>>> news:emHx%23x4SFHA.3012@TK2MSFTNGP14.phx.gbl...
>>>>>>>>>>>I have a legacy C++ dll that I P/Invoke into from a C# app. If I
>>>>>>>>>>>package it up into my installer cab and deploy it to /Windows,
>>>>>>>>>>>then immediately run the installed app, I get a
>>>>>>>>>>>MissingMethodException as though the dll is not there (but I see
>>>>>>>>>>>it). If I copy it to my app's directory I get the same behavior
>>>>>>>>>>>until I soft-reset.
>>>>>>>>>>>
>>>>>>>>>>> If I soft-reset, it seems to then work MOST of the time. But
>>>>>>>>>>> then about 15% of the time, I get it again. Soft reset helps
>>>>>>>>>>> again. So it's not just a matter of how the cab installer puts
>>>>>>>>>>> the dll file into /Windows, it kind of disappears during normal
>>>>>>>>>>> use somehow.
>>>>>>>>>>>
>>>>>>>>>>> Is there any sort of "dll registration" step that is required on
>>>>>>>>>>> PPC to make WindowsCE not forget about this dll? I thought just
>>>>>>>>>>> putting it in /Windows was all you need. My dllimport just
>>>>>>>>>>> gives the name of the dll, should I specify a fully qualified
>>>>>>>>>>> path, and would that make things better? In testing this all
>>>>>>>>>>> works great but with extended use of an hour or so, sometimes
>>>>>>>>>>> less, suddenly I can't p/invoke any more and get the MMEx.
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> Tim Johnson
>>>>>>>>>>> High Point Software, Inc.
>>>>>>>>>>> www.high-point.com
>>>>>>>>>>> (503) 312-8625
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>