michaelneu / webxcel

🤔 A REST backend built with plain VBA Microsoft Excel macros. Yes. Macros.
https://dev.to/michaelneu/to-vba-and-beyond---building-a-restful-backend-using-plain-microsoft-excel-macros-76n
MIT License
438 stars 70 forks source link

64 Bit error #5

Closed simohutcaus closed 6 years ago

simohutcaus commented 6 years ago

When i am running this on a 64 bit based machin with Excel 2016 i get a error that it needs to be compiled for a 64 bit system

"The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the ptrsafe attribute"

michaelneu commented 6 years ago

That's interesting as I've mainly developed webxcel on Windows 7 and 10 using only 64-bit machines and 64-bit Office 365. Though I ran into a similar error when trying to start webxcel on a Mac (would be awesome, but not supported yet; see Features board). So for clarification: what platform did you run it on?

I suppose that adding PtrSafe to all imported members of wsock32.bas should work, but I'll need to take a closer look into this to prevent side effects (this allowed me to at least launching webxcel on the Mac, but as it couldn't find wsock32.dll -- obviously, since that's Windows only -- it error'd out).

simohutcaus commented 6 years ago

Hi Michael,

Win 10 64 bit anniversary edition. Adding PtrSafe fixed the issue but i still get a error and it does not work.

michaelneu commented 6 years ago

Ok, I didn't run into any errors myself yet, so adding PtrSafe seems good to me.

What error did you get? An error I ran into quite frequently was trying to bind the server socket to an already used port, which resulted in error code -3. What error code did you receive exactly? Here's a list of error codes that I was aware of while creating webxcel.

Also keep in mind, that the default server configuration requires you to have a worksheet set up as a table, due to the WorkbookWebController is being initialized on server startup (this may yield the ErrorNoPrimaryKeyDefined error). To prevent this, add column names in the first row of your sheet and mark your primary key bold (as shown in the readme).

michaelneu commented 6 years ago

Closing this issue as it seems to have gone inactive. Feel free to reopen it, if you think this issue needs further discussion.