joyfullservice / msaccess-vcs-addin

Synchronize your Access Forms, Macros, Modules, Queries, Reports, and more with a version control system.
Other
203 stars 40 forks source link

Build from source fails with runtime error '-316276240' - Cannot set HelpContextID #32

Closed cenx1 closed 4 years ago

cenx1 commented 4 years ago

Systeminfo

Details

When I try to build my project from source an error is raised when trying to set the HelpContextId of the VBE Project (in the clsDbVbeProject module):

image

Removing the HelpContextId assignment statement makes the build move further, but I don't know what consequences it has to not set the HelpContextId?

The vbe-project.json file contains the following:

{
  "Info": {
    "Class": "clsDbVbeProject",
    "Description": "VBE Project",
    "VCS Version": "3.1.8"
  },
  "Items": {
    "Name": "Database",
    "Description": "",
    "FileName": "rel:testdb.accdb",
    "HelpContextId": 0,
    "HelpFile": "279249358",
    "Mode": 0,
    "Protection": 0,
    "Type": 100
  }
}

Let me know if you need further details.

joyfullservice commented 4 years ago

Are you using a custom help file in your application? The HelpFile and HelpContextId should both be read-write strings.

What happens if you try to set the property from the immediate window? Are you able to set the HelpFile property? I am not seeing any error in my system when setting these properties, so I am curious to see what might be causing the error.

A9G-Data-Droid commented 4 years ago

Something funky is going on here. In a recent export I am seeing this:

"HelpFile": "㜸㠳〰㈱"

And that is certainly not any help file I have ever used.

A9G-Data-Droid commented 4 years ago

So I found in my testing that when I was getting those automation errors setting the HelpContextId that the ID was still changing. So I added code that ignores the error and then checks to see if the value is correct. Only if the value didn't change will it throw the error.