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 8512355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:15:29+00:00 2026-06-11T04:15:29+00:00

I have a Visual Studio 2008 C++03 application for Windows CE 6.0 x86. I’m

  • 0

I have a Visual Studio 2008 C++03 application for Windows CE 6.0 x86. I’m having an issue where invoking a function from a DLL is causing an access violation exception, but only in debug mode.

// DLL header
extern "C" BOOL __stdcall Foo( const wchar_t*, const wchar_t*, wchar_t*, unsigned long );

// program
#include "foo.h"
#pragma comment( lib, "foo.lib" )
int main()
{
    wchar_t f[ 100 ];
    Foo( L"something", L"nothing", f, countof( f ) );    // access violation
    return 0;
}

I realize this could be caused by any number of different things, but I’m curious about the use of __stdcall in the DLL header. In Windows CE, the default (for windows APIs) is __cdecl. Why would this library use __stdcall? Could that have a detrimental effect?

Actually, why specify a calling convention at all?

Thanks

  • 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-11T04:15:30+00:00Added an answer on June 11, 2026 at 4:15 am

    In Windows CE, __stdcall is a macro that resolves to __cdecl. That is, they designate the same calling conventions. Your problem lies elsewhere. Use the debugger to investigate.

    A calling convention might be specified because it needs to be specified for the desktop version of the DLL, and it’s easier to keep the source code the same for both targets than to clutter it with conditional compilation that has no real effect.

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

Sidebar

Related Questions

Using Visual Studio 2008, c#, .net 2.0. I have a Windows Forms client application
Let's create WinForms Application (I have Visual Studio 2008 running on Windows Vista, but
I have a Visual Studio 2008 Windows Mobile 6 C++ application that is using
I have a Visual Studio 2008 C++ Windows Mobile 6 application where I'm using
I have a Visual Studio 2008 C++ application for Windows 7 where I would
I have made a small windows application with visual studio 2008 ,its working properly
I have a Windows Form Application in Visual Studio 2008 - PictureBox.Refesh() method causes
I have a Visual Studio 2008 C# .NET 3.5 application running on Windows XP
I have a Visual Studio 2008 C++ application for Windows where I have wrapped
I have a Windows application developed using Visual Studio 2008 (C#). It has a

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.