ctypes, python3.5, OSError: exception: access violation writing 0x00000000
<p>Researching other similar errors, I think that I have an issue with a an illegal operation such as writing to an address that I shouldn't be. I'm not sure how to resolve this. Any help please?</p>

<p>Exact error I'm getting:</p>

<pre><code>in GetSoftwareVersion()
result = f(LCP_Version, FCP_Version)
OSError: exception: access violation writing 0x00000000 
</code></pre>

<p>Functions I'm calling</p>

<pre><code>x = GetSoftWareVersion()
print(x)
</code></pre>

<p>GetSoftwareVersion() contents</p>

<pre><code>def GetSoftwareVersion():
    f = shim.GetSoftwareVersion

    LCP_Version = ct.c_char_p(0)
    FCP_Version = ct.c_char_p(0)

    result = f(LCP_Version, FCP_Version)

    if result:
        print(find_shim_error(result))

    return LCP_Version.contents.value, FCP_Version.contents.value
</code></pre>

<p>edit: adding the relevant C++ code</p>

<pre><code>PCSHIMDLL_API  error_status_type GetSoftwareVersion(
        char* LCP_Version,
        char* FCP_Version
        )
{
    error_status_type return_status = SUCCESS;
    string LCP_V("");
    string FCP_V("");
    LaserIDType_var laserID;
    laserID = p_DiagIF-&gt;GetLaserID();
    LCP_V = laserID-&gt;m_LCPSoftwareVersion;
    FCP_V = laserID-&gt;m_FCPSoftwareVersion;
    strcpy(LCP_Version, LCP_V.c_str());
    strcpy(FCP_Version, FCP_V.c_str());

    return return_status;
}
</code></pre>