Bug in ITypeLib 64 bit + Discussion on style of declarations
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- visualbasic
- Ambito
- api, operating-systems
Direzione di ricerca
Esamina Export/Sources/slTypelib.twin alle righe indicate 30 e 33, quindi confronta la dichiarazione di ITypeLib con la firma della Windows COM API, in particolare il tipo restituito PVOID. Conferma l’impatto sulla compatibilità di qualsiasi modifica allo stile dei parametri e documenta o implementa una soluzione concordata per le questioni relative alla dichiarazione e alla denominazione dell’API.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This should return LongPtr I believe (it is PVOID)
Also I wonder how you would feel about 2 (or 3) improvements to make this more idiomatic:
In my code, I have declared this as
Sub GetDocumentation(ByVal memid As MEMID, Optional ByRef pBstrName As String, Optional ByRef pBstrDocString As String = vbNullString, Optional ByRef pdwHelpContext As Long, Optional ByRef pBstrHelpFile As String)
with 2 changes: The Optional arguments, since these are optional from the API point of view. You can specify default of =vbNullString and =NULL_PTR or =0 if needed
Second change is I do
Public Enum MEMID
[_]
End Enum
This does a sort of typedef for DWORD types which improves readability IMO
3rd change is I rename parameters to for example
Sub GetDocumentation(ByVal memid As MEMID, Optional ByRef outName As String, ...)
Since ByRef pBstrName to me is
- Too much information; I don't need to know about Bstr as a VBA developer, just String
ByRefandpboth mean kinda the same thing, doubling up makes me expect to get a pointer to a string out, not just a string- I think the
outParamprefix is good from a VBA consumer point of view to make it clear. Attributes may be better in future tB.
I think this may be a harder sell as it is backwards incompatible for your library interface. However in my experience when I declare the APIs this way it makes me much less likely to need to look at the MSDN documentation. But it's still easy to look up online even if I've renamed the params, the function name is the same and the order of params is the same. Maybe for version 3.x of your package.
- Lingua principale
- Visual Basic 6.0
- Stelle
- 51
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fafalone/WinDevLib
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Status on Delegates?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
ToolboxApertadocumentation good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
Tutte le issue di fafalone/WinDevLib
Issue simili
-
refactor topic-map
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Add an EPUB parserApertaarea: core good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openapi/gknowledge#21 ·
-
get() for StrEnumForse già presa @FeJo5952 l’ha presa oggi. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
collective/icalendar#1921 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ETQ admin, le select de condition d'une annotation répétable liste les champs publics deux foisAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
demarche-numerique/demarche.numerique.gouv.fr#14301 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
github/github-mcp-server#3489 ·
I maintainer di solito rispondono entro 4 giorni