473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Trying to load a DLL from .NET Compact Framework. Originally used eVC 3.0

I've developed several programs for the Pocket PC in eMbedded Visual C
(API calls only, no MFC). All of these programs made use of a
third-party DLL called SecureTrial (www.zedev.com) to create 30-day
trial versions of the programs. The DLL was loaded dynamically at
run-time using LoadLibrary and GetProcAddress, as shown in the code
below. For the SecureTrial library, all I have are .DLL files
compiled for the MIPS, ARM, and SH3 processors (no source or
anything).

typedef DWORD (CALLBACK *ULPRET)(TRIALINFO);

DWORD stCheckTrial(TRIALINFO ti) {

HINSTANCE hinstLib;
ULPRET lpfnDLLProc;

// get pointer to function stCheckTrial in strial.dll
// then call the function and return its return value
// ti is a struct containing integer and UNICODE string data
// I removed the error checking code (verifying that hinstLib and
// lpfnDLLProc aren't NULL)
// just to simplify things for this example
hinstLib = LoadLibrary(TEXT("strial.dll"));
lpfnDLLProc = (ULPRET)GetProcAddress(hinstLib,
TEXT("stCheckTrial"));
retval = (*lpfnDLLProc)(ti);
FreeLibrary(hinstLib);

return retval;
}

I'm now considering switching over to Visual C++ .NET or Visual Basic
..NET, and I'm trying to gauge how difficult it will be to make this
new code call the old DLLs. I don't have any familiarity with those
environments, so I'm hoping someone can provide some insight. If it
can be done, what I'd really love to see are code snippets like the
one above but written in VC++.NET or VB.NET that will call the same
DLL. I'm just concerned about sinking a lot of time into learning one
or both of these environments, only to find that I won't be able to
use this existing library.

Will the fact that the DLLs were already compiled for specific
processors using eVC be a problem? What about building up the
TRIALINFO structure ti in Visual Basic .NET? I know this would be a
problem in eMbedded Visual Basic 3.0, since it's not possible to build
the struct in that language. I believe that there is an alternate
version of the function stCheckTrial that takes in multiple
parameters, instead of a single struct containing all of those
parameters, which would prevent the need to build the struct.

Thank you very much in advance!

By the way, I also posted this question on Expert Exchange. Feel free
to snag some points there:
http://www.experts-exchange.com/Prog..._20693106.html
Nov 22 '05 #1
0 813

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: boble | last post by:
Sorry, it's may be off topic ;_((( The following article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k3/ht ml/winmob03.asp states that a.. Microsoft Windows .NET...
0
by: devgru | last post by:
I've developed several programs for the Pocket PC in eMbedded Visual C (API calls only, no MFC). All of these programs made use of a third-party DLL called SecureTrial (www.zedev.com) to create...
2
by: Duncan | last post by:
I am using the evaluation version of CE.NET 4.1. I had also installed the release version of the Compact Framework. I uninstalled the CE.NET 4.1, and then realized I needed it again and...
13
by: Larry L | last post by:
Access is noted for bloating a database when you add and delete records frequently. I have always had mine set to compact on close, and that works great. Now after everyone's advice I split my...
0
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
5
by: Michal Rizek | last post by:
Hi, i need to use COM object in my application running on Pocket PC 2003. I used tlbimp utility to create clr assembly and added it into my project. But when i try to create instance of COM object...
1
by: Keith | last post by:
Someone was kind enough to send me a control that he developed that does precisely what I need it to do. However - the code was originally written in VB.NET for windows apps. I'm developing for...
2
by: amplifier | last post by:
Hi all, I am new to c# programming. I want to ask what function I should use so as to check the currently used version of .net compact framework ? Thanks.
0
by: sameer | last post by:
hey! guys i have a barcode scanner Symbol MC 9060 running windows CE .net with compact 1.1 framework installed on it. My application is done in Visual studio 2003, winforms with vb.net 2003 and...
0
by: phillin77 | last post by:
My library need to be used both on .NET Framework and .NET Compact Framework. In .NET Framework, I use Monitor.TryEnter(Object, millisecondsTimeout) to get into a lock or timeout. But in .NET...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.