Skip to main content
ABeyb.1
Visitor II
July 30, 2021
Solved

Can't use STM32CubeProgrammer API

  • July 30, 2021
  • 3 replies
  • 1431 views

Hi everyone,

I'm trying to develop my own console project in C++ on Visual Studio using the SMT32 API to download and verify an STM32 CPU and I need your help please.

I can build my solution with no error but I can't run it. I get : The Application was Unable to Start Correctly (0xc000007b). Same thing happens when I try to run the project STM32CubePrgAP.sln provided by STM as an example on how to use their API (available on the install path of STM32CubeProgrammer)

I’m not an expert but I already used DLL on my projects with no problem.

I made sure to use a compatible version (x64 or x86) of the .lib file and the project STM32CubePrgAP

Microsoft Visual C++ is already installed

I'm using Visual Studio 2019

Can you please help me ?

Thx in advance and bear with me :)

This topic has been closed for replies.
Best answer by Marcuka

Thanks for the fast answer.

I found it. The application is 64 bit but needs the 32 bit version of these DLL files.

3 replies

Pavel A.
Super User
July 30, 2021

0xc000007b is STATUS_INVALID_IMAGE_FORMAT.

"Bad Image .... either not designed to run on Windows or it contains an error."

Marcuka
Associate II
January 6, 2022

Hi,

I'm using the C++ api on 64 bit machine with success. When run the exe on another PC some DLL's are missing. It seems some of them are 32 bit. Can you please tell which version these DLL's requires - the 32 or 64 bit?

Thank in advance,

Martin0693W00000HqmfJQAR.png

Tesla DeLorean
Guru
January 6, 2022

Possibly need the MSVC Redistributable files from the version you used. You'll need the 32-bit ones if the app/library are 32-bit.

Use PEDUMP or other tools to check what import expectations the DLL has.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Marcuka
MarcukaBest answer
Associate II
January 6, 2022

Thanks for the fast answer.

I found it. The application is 64 bit but needs the 32 bit version of these DLL files.