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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:38:46+00:00 2026-05-25T01:38:46+00:00

The segment below is part of a larger function in a larger file. I

  • 0

The segment below is part of a larger function in a larger file. I have reduced it to what I think are the essentials for explaining my current problem.

I am using Visual Studio 2010.

The line with the call to RegConnectRegistryA is causing the compiler to warn me thusly: “warning C4229: anachronism used : modifiers on data are ignored”. That is the only warning or error in the compiler output. The build does succeed, and the executable runs as expected. But I do want to get rid of that warning. (I think it’s been there for many months, to be honest.)

extern "C" __declspec(dllexport) void whoOpsRegistryGetREG_SZ(
    LPCSTR szServer, 
    LPCSTR szKey, 
    LPCSTR szValue, 
    char* szReturn, 
    int iSize) 
{
    HKEY hKey;
    LONG WINAPI lReturn = ::RegConnectRegistryA(
        szServer, 
        HKEY_LOCAL_MACHINE, 
        &hKey);
}

What I read in other posts leads me to believe that it is somehow related to the #includes. So here they are. If you need the contents of any of the header files in quotes, let me know.

#include "stdafx.h"
#include <windows.h>
#include <initguid.h>
#include <ole2.h>
#include <mstask.h>
#include <msterr.h>
#include <objidl.h>
#include <wchar.h>
#include <stdio.h>
#include <stdarg.h>
#include <lm.h>
#include "whoOpsPrivate.h"
#include "whoOps.h"
#include "jni.h"
#include "whoOps_TaskScheduler.h"
#include "whoOps_ServiceMangler.h"
#include "whoOps_RegistryRaptor.h"
#include "../../cyclOps.h"

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-05-25T01:38:47+00:00Added an answer on May 25, 2026 at 1:38 am

    Looks to me like the problem is that WINAPI is actually a calling convention (IIRC it turns out to mean stdcall) so it makes no sense to apply that to the declaration of the variable lResult. I don’t have a Windows development environment handy to test, but I strongly suspect the warning would go away if you remove WINAPI.

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

Sidebar

Related Questions

I have a code segment as below that uses BufferedReader to read inputs from
If you look at the image below, I have an segment button which is
Below I have a segment of my code that I recently added to my
I have the following segment of a java file: Integer x; Integer y; Face
I have a large application written using .Net remoting for file transfer. This was
I have some C++ code (segment seen below), I need to convert this to
I have an odd problem. When I try to compile the code below, it
In what segment (.BSS, .DATA, other) of an executable file are static variables stored
In my code segment, when I script the file name, it gives me a
I'm using a Segment to Segment closest approach method which will output the closest

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.