{"id":21070842,"url":"https://github.com/fafalone/longlonghelper","last_synced_at":"2026-03-19T18:43:26.294Z","repository":{"id":151901663,"uuid":"563578870","full_name":"fafalone/LongLongHelper","owner":"fafalone","description":"LongLongHelper DLL For VB6","archived":false,"fork":false,"pushed_at":"2022-11-17T05:45:55.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T20:30:58.402Z","etag":null,"topics":["twinbasic","vb6"],"latest_commit_sha":null,"homepage":"","language":"Visual Basic 6.0","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fafalone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-08T22:46:45.000Z","updated_at":"2023-12-11T04:32:02.000Z","dependencies_parsed_at":"2023-05-15T01:45:13.050Z","dependency_job_id":null,"html_url":"https://github.com/fafalone/LongLongHelper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fafalone/LongLongHelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fafalone%2FLongLongHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fafalone%2FLongLongHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fafalone%2FLongLongHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fafalone%2FLongLongHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fafalone","download_url":"https://codeload.github.com/fafalone/LongLongHelper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fafalone%2FLongLongHelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28833496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"online","status_checked_at":"2026-01-28T02:00:06.943Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["twinbasic","vb6"],"created_at":"2024-11-19T18:48:34.766Z","updated_at":"2026-01-28T02:06:06.697Z","avatar_url":"https://github.com/fafalone.png","language":"Visual Basic 6.0","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LongLongHelper\n\nProvides a standard DLL for handling Currency in VB6 as actually a LongLong variable, using twinBASIC's native support for LongLong and Standard DLLs.\n\nIn VB6 when we need to use 64bit integers, we use the [tt]Currency[/tt] type, but since it's a hack, they're difficult to work with, because VB is wont to shift them back and forth by 10,000 since a Currency is a 0.0000 decimal type. This is a Standard DLL written in twinBASIC (which supports that project type natively) that treats VB6 Currency variable you're using as LongLong as actual LongLong types, and performs operations on them using twinBASIC's native language support for the LongLong type, making the code extraordinarily simple.\n\nSo you have e.g.\n```\n[ DllExport ]\n    Public Function LongLongAnd(ByVal c1 As LongLong, ByVal c2 As LongLong) As LongLong\n        On Error GoTo fail\n        LongLongAnd = (c1 And c2)\n        hErr = S_OK\n        Exit Function\n    fail:\n        hErr = Err.Number\n    End Function\n    \n    [ DllExport ]\n    Public Function LongLongOr(ByVal c1 As LongLong, ByVal c2 As LongLong) As LongLong\n        On Error GoTo fail\n        LongLongOr = (c1 Or c2)\n        hErr = S_OK\n        Exit Function\n    fail:\n        hErr = Err.Number\n    End Function\n```\nThat you then declare in VB6 as \n\n`Public Declare Function LongLongAnd Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency`\n\n`Public Declare Function LongLongXOr Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency`\n\n\nThe DLL sees them as a LongLong, so you don't need to worry about multiplying or dividing by 10,000 until you want to e.g. display the result. \n\n\nThere's also a CLngLng function:\n\n```\n[ DllExport ]\n    Public Function CLongLong(ByVal Value As Variant) As LongLong\n        On Error GoTo fail\n        CLongLong = CLngLng(Value)\n        hErr = S_OK\n        Exit Function\n    fail:\n        hErr = Err.Number\n    End Function\n```\n`Public Declare Function CLngLng Lib \"LngLngHelp.dll\" Alias \"CLongLong\" (ByVal Value As Variant) As Currency`\n\nThe error codes you see being set can be retrieved with `LongLongLastError`.\n\nHere's a complete set of declares for the DLL:\n```\nPublic Declare Function LongLongAdd Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongSub Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongOr Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongAnd Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongXOr Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongNot Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongDiv Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongMul Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal c2 As Currency) As Currency\nPublic Declare Function LongLongLShift Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal By As Byte) As Currency\nPublic Declare Function LongLongRShift Lib \"LngLngHelp.dll\" (ByVal c1 As Currency, ByVal By As Byte) As Currency\nPublic Declare Sub LongLongInc Lib \"LngLngHelp.dll\" (c1 As Currency, Optional ByVal Amount As Long = 1)\nPublic Declare Sub LongLongDec Lib \"LngLngHelp.dll\" (c1 As Currency, Optional ByVal Amount As Long = 1)\nPublic Declare Function CLngLng Lib \"LngLngHelp.dll\" Alias \"CLongLong\" (ByVal Value As Variant) As Currency\nPublic Declare Function LongLongLastError Lib \"LngLngHelp.dll\" () As Long 'Check if last operation errored.\n```\n\nFull source can be browsed in \\Export in addition to the download of full source .twinproj file. \n\nAny remotely recent version of twinBASIC should work if you wish to compile/modify the DLL yourself. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffafalone%2Flonglonghelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffafalone%2Flonglonghelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffafalone%2Flonglonghelper/lists"}