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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:14:00+00:00 2026-06-10T13:14:00+00:00

Perhaps this is an issue of magic. I’m trying to create a function that

  • 0

Perhaps this is an issue of magic. I’m trying to create a function that has the following signature(or equivalent const char *const *args)

void ExecuteJavaVM(char** args){
 
}

I want to emulate how execv handles an array of parameters, as you may know execv doesn’t requires us to put the max number of elements of the array. It just magically counts the number of elements in the array we pass as its second parameter.

This is the execv signature.

intptr_t _execv( 
   const char *cmdname,
   const char *const *argv 
);

Somehow execv manages to "count" the number of elements in the array argv. This is exactly what I’m trying to do.

sizeof is almost useless, since the datatype of the array decays to a simple pointer, so sizeof will most probably always return 4.

Any ideas? Anyone knows where to find the sources of these functions for Windows?

  • 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-10T13:14:01+00:00Added an answer on June 10, 2026 at 1:14 pm

    From the POSIX docs (emphasis mine):

    The argument argv is an array of character pointers to null-terminated strings. The application shall ensure that the last member of this array is a null pointer. These strings shall constitute the argument list available to the new process image. The value in argv[0] should point to a filename that is associated with the process being started by one of the exec functions.

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

Sidebar

Related Questions

Has anyone ever heard of overriding too many classes in Java? Perhaps this issue
OK since I am in a holding pattern on this issue perhaps someone has
Perhaps this question has been asked elsewhere, but I'm unable to find it. With
Perhaps this has something to do with it being the mainForm, but I'll ask
That title may need some work. Perhaps after reading this, you may be able
I have been thinking about this issue and I can't figure it out. Perhaps
UPDATE: This issue has been fixed as of Xcode 4.6! This technique now works
I've been trying for many days to try and solve this issue. A 3rd
This issue is really frustrating me. I am developping a webapp that creates ical
I'm using v1.3.1 of PlayN. This issue is discussed in the following google groups

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.