Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9251375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:40:57+00:00 2026-06-18T10:40:57+00:00

I want to upgrade a device using a proprietary library (DLL) that I developed.

  • 0

I want to upgrade a device using a proprietary library (DLL) that I developed. The library works fine using a MFC app. However, the twist here is that we must make this work in a browser.

My idea was to use an applet and then call the native DLL to make this work. Everything was working fine with my test Java application. Then I tried with the applet and then nothing worked.

I’ve narrowed down the problem to 32bit VS 64bits JVM. Let me explain : the Eclipse IDE that I am using uses a 64bit JVM since I am on Windows 7 64bit. The browser, however, uses a 32bit JVM and that doesn’t work.

The difference between the two are the parameters passed to my function. Here’s some examples of the functions that the DLL exposes :

bool UPGRADELIB_API Connect( const char* serverAddress, unsigned short serverPort );
bool UPGRADELIB_API Upgrade( const char* pFilePath );

Which are respectively matched in Java by :

boolean Icon_ConnectClientNode( String serverAddress, int serverPort );
boolean Icon_Upgrade( String pFilePath );

My Java test GUI passes to this native lib “192.168.x.x” for the IP address and 50005 for the port. In 64bit, everything is fine, as I said earlier. In 32bit, if I print serverAddress and serverPort in C, it shows

(null):62384

As you can see, even the port is not passed correctly.

I’ve been on this for a week now, I am pulling so much hair from my head that I won’t have any soon… please help me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:40:59+00:00Added an answer on June 18, 2026 at 10:40 am

    Found the error : was passing a long and the Java long is not the same size as the C/C++ long in 32bit and 64bit.

    Silly me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have project I want to upgrade to .Net4 and it use BackgroundCopyManager.dll. Anyone
I just want to test the app in a real device, but it seems
As of now we are using Struts1.2.4 with java4. We want to upgrade it
I want to upgrade my iPhone app from iOS3 to iOS4. Once I upgrade
I upload my first app into market, and now I want to upgrade a
I have an app that I want to distribute to 3.1.x devices, but I
I have a super-trivial application on GAE that I want to upgrade to HRD
i am using samsung galaxy ace with 2.3.3 OS i want to upgrade my
i want to upgrade my install component, in such a way,that only only specfied
I want to upgrade my web application to the latest JSF Mojarra (2.1.9 as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.