AutoHotkey Community

It is currently May 27th, 2012, 12:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: February 16th, 2010, 9:12 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
HI,

I'm stuck with the array function of AudioGenie to get a picture from a file. Here is my code; Could you please help me?
To test you'll need AudioGenie3.dll, Gdi.ahk and a mp3 file with an included picture.
The code is basically the same as in this post where it worked just fine.
Code:
OnExit, Exit
#Include, Gdip.ahk                                                  ;include GDI+
hAudioGenie3 := DllCall( "LoadLibrary", Str,"AudioGenie3.dll" )     ;load AudioGenie3

SS_BITMAP = 0xE
Gui, 1:Add, Picture, w500 h500 +%SS_BITMAP% vPctControl HwndhPctControl,   ;control to hold the picture     
Gui, 1:Show, AutoSize Center, Test                                      ;normal AHK GUI
AudioGenie(hPctControl)
Return

AudioGenie(hPctControl){
  global pToken
  If (!pToken := Gdip_Startup()){     ; Start gdi+
     MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
     Return
  }
  mp3FileA := "test2.mp3"                                             ;specify mp3 file
  ATOU(mp3FileU,mp3FileA)
  DllCall( "AudioGenie3\AUDIOAnalyzeFileW", Str,mp3FileU )            ;open mp3 file

  ;get MaxNumberOfAPIC Frames
  APIC = 0x41504943                                     ;Frame ID "APIC" as Hex Number
  FrameCountAPIC := DllCall("AudioGenie3\ID3V2GetFrameCountW", Int,APIC )
  If (FrameCountAPIC < 1)
    MsgBox, No Picture in MP3 file
   
  MaxLen = 5000000                             ;size of array in bytes; assume large picture
  VarSetCapacity(PicAsBin, MaxLen, 0)
  nSize := DllCall("AudioGenie3\ID3V2GetPictureArrayW", UInt,&PicAsBin, Int,MaxLen, Int,FrameCountAPIC)
  If nSize < 0
    MsgBox, % UTOA( DllCall("AudioGenie3\AUDIOGetLastErrorTextW") )
 
;   NewSize := VarSetCapacity(PicAsBin, -1)      ;<= doesn't work, it shrinks the var to much
;   MsgBox, %nSize% %NewSize%
 
  ;testing binary data by writing it to file      ;<= this works, picture is jpg and can be opened in image editor
;   PicAsHex := Bin2Hex(&PicAsBin,nSize)          ;convert it to hex
;   FileName = B.jpg                              ;set temp file name
;   BinWrite(FileName, PicAsHex)                  ;write hex data to binary temp file
 
  hData := DllCall("GlobalAlloc", UInt,2, UInt,nSize)               ;<= from here downwards somewhere is the mistake
  pData := DllCall("GlobalLock", UInt,hData)
  DllCall("RtlMoveMemory", UInt,pData, UInt,&PicAsBin, UInt,nSize)
  DllCall("GlobalUnlock", UInt,hData)
  DllCall("ole32\CreateStreamOnHGlobal", UInt,hData, Int,1, UIntP,pStream)  ;Use COM
  DllCall( "gdiplus\GdipCreateBitmapFromStream", UInt,pStream, UIntP,pBitmap )
  DllCall( NumGet(NumGet(1*pStream)+8 ), UInt,pStream )                     ;Release COM
  hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  SetImage(hPctControl, hBitmap)
 
  ; The bitmap we made from the image may be deleted
  Gdip_DisposeImage(pBitmap)
  DeleteObject(hBitmap)
}

GuiClose:
Esc::
Exit:
  Gdip_Shutdown(pToken)
  DllCall("FreeLibrary", UInt, hAudioGenie3)
  ExitApp
Return

; by Laszlo
; www.autohotkey.com/forum/topic4546.html
BinWrite(file, data, n=0, offset=0)
{
   ; Open file for WRITE (0x40..), OPEN_ALWAYS (4): creates only if it does not exists
   h := DllCall("CreateFile","str",file,"Uint",0x40000000,"Uint",0,"UInt",0,"UInt",4,"Uint",0,"UInt",0)
   IfEqual h,-1, SetEnv, ErrorLevel, -1
   IfNotEqual ErrorLevel,0,Return,0 ; couldn't create the file

   m = 0                            ; seek to offset
   IfLess offset,0, SetEnv,m,2
   r := DllCall("SetFilePointerEx","Uint",h,"Int64",offset,"UInt *",p,"Int",m)
   IfEqual r,0, SetEnv, ErrorLevel, -3
   IfNotEqual ErrorLevel,0, {
      t = %ErrorLevel%              ; save ErrorLevel to be returned
      DllCall("CloseHandle", "Uint", h)
      ErrorLevel = %t%              ; return seek error
      Return 0
   }

   TotalWritten = 0
   m := Ceil(StrLen(data)/2)
   If (n <= 0 or n > m)
       n := m
   Loop %n%
   {
      StringLeft c, data, 2         ; extract next byte
      StringTrimLeft data, data, 2  ; remove  used byte
      c = 0x%c%                     ; make it number
      result := DllCall("WriteFile","UInt",h,"UChar *",c,"UInt",1,"UInt *",Written,"UInt",0)
      TotalWritten += Written       ; count written
      if (!result or Written < 1 or ErrorLevel)
         break
   }

   IfNotEqual ErrorLevel,0, SetEnv,t,%ErrorLevel%

   h := DllCall("CloseHandle", "Uint", h)
   IfEqual h,-1, SetEnv, ErrorLevel, -2
   IfNotEqual t,,SetEnv, ErrorLevel, %t%

   Return TotalWritten
}

/*
  Bin2Hex() and Hex2Bin()
  Machine code functions: Bit Wizardry [ By Laszlo Hars ]
  Topic : http://www.autohotkey.com/forum/viewtopic.php?t=21172
  Post  : http://www.autohotkey.com/forum/viewtopic.php?p=180469#180469
*/
Bin2Hex(addr,len) { ; Bin2Hex(&x,4)
   Static fun
   If (fun = "")
      Hex2Bin(fun,"8B4C2404578B7C241085FF7E2F568B7424108A06C0E8042C0A8AD0C0EA05"
      . "2AC2044188018A06240F2C0A8AD0C0EA052AC2410441468801414F75D75EC601005FC3")
   VarSetCapacity(hex,2*len+1)
   dllcall(&fun, "uint",&hex, "uint",addr, "uint",len, "cdecl")
   VarSetCapacity(hex,-1) ; update StrLen
   Return hex
}

Hex2Bin(ByRef bin, hex) { ; Hex2Bin(fun,"8B4C24") = MCode(fun,"8B4C24")
   Static fun
   If (fun = "") {
      h:="568b74240c8a164684d2743b578b7c240c538ac2c0e806b109f6e98ac802cac0e104880f8"
       . "a164684d2741a8ac2c0e806b309f6eb80e20f02c20ac188078a16474684d275cd5b5f5ec3"
      VarSetCapacity(fun,StrLen(h)//2)
      Loop % StrLen(h)//2
         NumPut("0x" . SubStr(h,2*A_Index-1,2), fun, A_Index-1, "Char")
   }
   VarSetCapacity(bin,StrLen(hex)//2)
   dllcall(&fun, "uint",&bin, "Str",hex, "cdecl")
}

ATOU( ByRef Unicode, Ansi ) { ; Ansi to Unicode
  VarSetCapacity( Unicode, (Len:=StrLen(Ansi))*2+1, 0 )
  Return DllCall( "MultiByteToWideChar", Int,0,Int,0,Str,Ansi,UInt,Len, Str,Unicode, UInt,Len )
}

UTOA( pUnicode )  {           ; Unicode to Ansi
  VarSetCapacity( Ansi,(nSz:=DllCall( "lstrlenW", UInt,pUnicode )+1) )
  DllCall( "WideCharToMultiByte", Int,0, Int,0, UInt,pUnicode, UInt,nSz
                                , Str,Ansi, UInt,nSz+1, Int,0, Int,0 )
  Return Ansi
}
EDIT: Found the problem. Forgot to start the GDI..... It's working now

_________________
Ciao
toralf
Image


Last edited by toralf on February 16th, 2010, 9:41 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2010, 9:29 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Hi HotKeyIt,

I just looked through your DynaCall file.

The functions ID3V2GetTextFrameW and ID3V2GetURLFrameW expect a FrameID. Which are basically the 4 character FrameIDs as hex numbers. without that most of the Frames can't be read. And they are the most important in an ID3 tag.

All the ID3V2GetPicture... functions need an index number of the picture they should retrieve the data for.

Sorry, but without these functions working I will not even test the DynaCall file.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2010, 9:52 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Sorry I should have looked closer into that, the problem was a different one.
Following functions are wrapped here AudioGenie3.ahk (require latest AutoHotkey_H).
I wrapped them using Excel so there might be errors :)
Code:
AACGetBitRateTypeW();
AACGetHeaderTypeW();
AACGetProfileW();
APEGetAlbumW();
APEGetArtistW();
APEGetCommentW();
APEGetCopyrightW();
APEGetGenreW();
APEGetItemKeysW();
APEGetTitleW();
APEGetTrackW();
APEGetUserItemW(LPCWSTR Key);
APEGetVersionW();
APEGetYearW();
AUDIOGetAlbumW();
AUDIOGetArtistW();
AUDIOGetChannelModeW();
AUDIOGetCommentW();
AUDIOGetGenreW();
AUDIOGetLastErrorTextW();
AUDIOGetLastFileW();
AUDIOGetMD5ValueW();
AUDIOGetTitleW();
AUDIOGetTrackW();
AUDIOGetVersionW();
AUDIOGetYearW();
FLACGetAlbumW();
FLACGetArtistW();
FLACGetCommentW();
FLACGetContactW();
FLACGetCopyrightW();
FLACGetDateW();
FLACGetDescriptionW();
FLACGetGenreW();
FLACGetISRCW();
FLACGetItemKeysW();
FLACGetLicenseW();
FLACGetLocationW();
FLACGetOrganizationW();
FLACGetPerformerW();
FLACGetTitleW();
FLACGetTrackW();
FLACGetUserItemW(LPCWSTR ItemKey);
FLACGetVendorW();
FLACGetVersionW();
GetAudioGenieVersionW();
GetMD5ValueFromFileW(LPCWSTR FileName);
ID3V1GetAlbumW();
ID3V1GetArtistW();
ID3V1GetCommentW();
ID3V1GetGenreItemW(short number);
ID3V1GetGenreW();
ID3V1GetTitleW();
ID3V1GetTrackW();
ID3V1GetVersionW();
ID3V1GetYearW();
ID3V2GetAddendumDescriptionW(LPCWSTR ID);
ID3V2GetAddendumTitleW(LPCWSTR ID);
ID3V2GetAllFrameIDsW();
ID3V2GetAudioEncryptionURLW(short Index);
ID3V2GetChildElementIDW(LPCWSTR ID, short Index);
ID3V2GetCommentDescriptionW(short Index);
ID3V2GetCommentLanguageW(short Index);
ID3V2GetCommentW(short Index);
ID3V2GetCommercialFrameContactURLW(short Index);
ID3V2GetCommercialFrameDescriptionW(short Index);
ID3V2GetCommercialFramePictureMimeW(short Index);
ID3V2GetCommercialFramePriceW(short Index);
ID3V2GetCommercialFrameSellerNameW(short Index);
ID3V2GetCommercialFrameValidUntilW(short Index);
ID3V2GetEncryptionURLW(short Index);
ID3V2GetEqualisationIdentificationW(short Index);
ID3V2GetGeneralObjectDescriptionW(short Index);
ID3V2GetGeneralObjectFilenameW(short Index);
ID3V2GetGeneralObjectMimeW(short Index);
ID3V2GetGenreW();
ID3V2GetGroupIdentificationURLW(short Index);
ID3V2GetLinkedInformationAdditionalDataW(short Index);
ID3V2GetLinkedInformationURLW(short Index);
ID3V2GetLyricDescriptionW(short Index);
ID3V2GetLyricLanguageW(short Index);
ID3V2GetLyricW(short Index);
ID3V2GetOwnershipDateW();
ID3V2GetOwnershipPriceW();
ID3V2GetOwnershipSellerW();
ID3V2GetPictureDescriptionW(short Index);
ID3V2GetPictureMimeW(short Index);
ID3V2GetPictureTypeTextW(short Index);
ID3V2GetPopularimeterEmailW(short Index);
ID3V2GetPossibleCHAPIDW();
ID3V2GetPossibleTOCIDW();
ID3V2GetPrivateFrameURLW(short Index);
ID3V2GetRelativeVolumeAdjustmentIdentifierW(short Index);
ID3V2GetSubFrameDescriptionW(LPCWSTR ID, short Index);
ID3V2GetSubFrameTextW(LPCWSTR ID, short Index);
ID3V2GetSyncLyricDescriptionW(short Index);
ID3V2GetSyncLyricLanguageW(short Index);
ID3V2GetSyncLyricW(short Index);
ID3V2GetTextFrameW(u32 FrameID);
ID3V2GetTOCRootIDW();
ID3V2GetUniqueFileIdentifierOwnerW(short Index);
ID3V2GetURLFrameW(u32 FrameID);
ID3V2GetUserFrameLanguageW(short Index);
ID3V2GetUserFrameW(short Index);
ID3V2GetUserTextDescriptionW(short Index);
ID3V2GetUserTextW(short Index);
ID3V2GetUserURLDescriptionW(short Index);
ID3V2GetUserURLW(short Index);
ID3V2GetVersionW();
LYRICSGetAlbumW();
LYRICSGetArtistW();
LYRICSGetAuthorW();
LYRICSGetGenreW();
LYRICSGetImageLinkW();
LYRICSGetIndicationW();
LYRICSGetInformationW();
LYRICSGetLyricsW();
LYRICSGetTitleW();
LYRICSGetVersionW();
MONKEYGetCompressionW();
MP4GetGenreW();
MP4GetTextFrameW(u32 FrameID);
MP4GetTrackW();
MPEGGetEmphasisW();
MPEGGetEncoderW();
MPEGGetLayerW();
MPEGGetVersionW();
OGGGetAlbumW();
OGGGetArtistW();
OGGGetCommentW();
OggGetContactW();
OGGGetCopyrightW();
OGGGetDateW();
OGGGetDescriptionW();
OGGGetGenreW();
OGGGetISRCW();
OGGGetItemKeysW();
OGGGetLicenseW();
OGGGetLocationW();
OGGGetOrganizationW();
OGGGetPerformerW();
OGGGetTitleW();
OGGGetTrackW();
OGGGetUserItemW(LPCWSTR ItemKey);
OGGGetVendorW();
OGGGetVersionW();
WAVGetFormatW();
WAVGetTextFrameW(u32 FrameID);
WMAGetAlbumArtistW();
WMAGetAlbumW();
WMAGetArtistW();
WMAGetAuthorURLW();
WMAGetBeatsPerMinuteW();
WMAGetCategoryW();
WMAGetCommentW();
WMAGetComposerW();
WMAGetConductorW();
WMAGetContentGroupDescriptionW();
WMAGetCopyrightW();
WMAGetDistributorW();
WMAGetEncodedByW();
WMAGetEncodingSettingsW();
WMAGetEncodingTimeW();
WMAGetGenreW();
WMAGetInitialKeyW();
WMAGetISRCW();
WMAGetItemKeysW();
WMAGetLanguageW();
WMAGetLyricsW();
WMAGetMoodW();
WMAGetParentalRatingW();
WMAGetPartOfSetW();
WMAGetPeriodW();
WMAGetPictureDescriptionW(short Index);
WMAGetPictureMimeW(short Index);
WMAGetProducerW();
WMAGetPromotionURLW();
WMAGetProviderW();
WMAGetPublisherW();
WMAGetRatingW();
WMAGetTitleW();
WMAGetToolNameW();
WMAGetToolVersionW();
WMAGetTrackNumberW();
WMAGetUserItemW(LPCWSTR ItemKey);
WMAGetUserWebURLW();
WMAGetWriterW();
WMAGetYearW();
AUDIOGetDurationW();
FLACGetCompressionRatioW();
MONKEYGetCompressionRatioW();
MONKEYGetPeakW();
APEGetSizeW();
AUDIOGetBitrateW();
AUDIOGetChannelsW();
AUDIOGetDurationMillisW();
AUDIOGetFileSizeW();
AUDIOGetLastErrorNumberW();
AUDIOGetSampleRateW();
FLACGetBitsPerSampleW();
FLACGetMaxBlockSizeW();
FLACGetMaxFrameSizeW();
FLACGetMinBlockSizeW();
FLACGetMinFrameSizeW();
FLACGetSamplesW();
GetConfigValueW(u32 key);
ID3V2GetAudioEncryptionDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetAudioSeekPointBitsPerIndexpointW();
ID3V2GetAudioSeekPointDataW(BYTE *arr, u32 maxLen);
ID3V2GetAudioSeekPointLengthW();
ID3V2GetAudioSeekPointNumberW();
ID3V2GetAudioSeekPointStartW();
ID3V2GetCommercialFramePictureW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetEncryptionDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetEqualisationDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetEventTimingCodesDataW(BYTE *arr, u32 maxLen);
ID3V2GetGeneralObjectDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetGroupIdentificationDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetLinkedInformationFrameIdentifierW(short Index);
ID3V2GetMpegLocationLookupTableBytesDeviationW();
ID3V2GetMpegLocationLookupTableBytesW();
ID3V2GetMpegLocationLookupTableDataW(BYTE *arr, u32 maxLen);
ID3V2GetMpegLocationLookupTableFramesW();
ID3V2GetMpegLocationLookupTableMillisecondsDeviationW();
ID3V2GetMpegLocationLookupTableMillisecondsW();
ID3V2GetMusicCdIdentifierDataW(BYTE *arr, u32 maxLen);
ID3V2GetPictureArrayW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetPlayCounterW();
ID3V2GetPopularimeterCounterW(short Index);
ID3V2GetPositionSynchronisationValueW();
ID3V2GetPrivateFrameDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetRecommendedBufferSizeOffsetW();
ID3V2GetRecommendedBufferSizeValueW();
ID3V2GetRelativeVolumeAdjustmentDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetSeekOffsetW();
ID3V2GetSignatureFrameDataW(BYTE *arr, u32 maxLen, short Index);
ID3V2GetSizeW();
ID3V2GetSubFrameImageW(BYTE *arr, u32 maxLen, LPCWSTR ID, short Index);
ID3V2GetSynchronizedTempoDataW(BYTE *arr, u32 maxLen);
ID3V2GetUniqueFileIdentifierDataW(BYTE *arr, u32 maxLen, short Index);
LYRICSGetSizeW();
LYRICSGetStartPositionW();
MONKEYGetFramesW();
MONKEYGetSamplesPerFrameW();
MONKEYGetSamplesW();
MP4GetPictureArrayW(BYTE *arr, u32 maxLen, short Index);
MP4GetPictureCountW();
MPEGGetFramePositionW();
MPEGGetFrameSizeW();
MPEGGetFramesW();
MPPGetFramesW();
OGGGetBitRateNominalW();
WAVGetBitsPerSampleW();
WAVGetBlockAlignW();
WAVGetBytesPerSecondW();
WAVGetChannelsW();
WAVGetHeaderSizeW();
WMAGetPictureArrayW(BYTE *arr, u32 maxLen, short Index);
APEExistsW();
APERemoveTagFromFileW(LPCWSTR FileName);
APERemoveTagW();
APESaveChangesToFileW(LPCWSTR FileName);
APESaveChangesW();
AUDIOAnalyzeFileW(LPCWSTR FileName);
AUDIOFormatIsValidW();
AUDIOSaveChangesToFileW(LPCWSTR FileName);
AUDIOSaveChangesW();
FLACSaveChangesToFileW(LPCWSTR FileName);
FLACSaveChangesW();
ID3V1ExistsW();
ID3V1GetGenreIDW();
ID3V1GetGenresW();
ID3V1RemoveTagFromFileW(LPCWSTR FileName);
ID3V1RemoveTagW();
ID3V1SaveChangesToFileW(LPCWSTR FileName);
ID3V1SaveChangesW();
ID3V2AddAudioEncryptionW(BYTE *arr, u32 maxLen, LPCWSTR URL, short PreviewStart, short PreviewLength);
ID3V2AddAudioSeekPointW(BYTE *arr, u32 maxLen, long start, long length, short numbers, BYTE BitsPerPoint);
ID3V2AddChapterW(LPCWSTR ID, LPCWSTR Title, LPCWSTR Description, u32 startTime, u32 endTime);
ID3V2AddChildElementW(LPCWSTR ParentTocID, LPCWSTR ChildID);
ID3V2AddCommentW(LPCWSTR Language, LPCWSTR Description, LPCWSTR Text);
ID3V2AddCommercialFrameW(BYTE *arr, u32 maxLen, LPCWSTR Price, LPCWSTR validUntil, LPCWSTR contactUrl , short receivedAs , LPCWSTR seller, LPCWSTR description);
ID3V2AddEncryptionW(BYTE *arr, u32 maxLen, LPCWSTR URL, short Symbol);
ID3V2AddEqualisationW(BYTE *arr, u32 maxLen, BYTE Interpolationmethod, LPCWSTR Identification);
ID3V2AddEventTimingCodesW(BYTE *arr, u32 maxLen, BYTE TimestampFormat);
ID3V2AddGeneralObjectW(BYTE *arr, u32 maxLen, LPCWSTR Mime, LPCWSTR FileName, LPCWSTR Description);
ID3V2AddGroupIdentificationW(BYTE *arr, u32 length, LPCWSTR Url, BYTE symbol);
ID3V2AddLinkedInformationW(long FrameIdentifier, LPCWSTR URL, LPCWSTR additionalData);
ID3V2AddLyricW(LPCWSTR Language, LPCWSTR Description, LPCWSTR Text);
ID3V2AddMpegLocationLookupTableW(BYTE *arr, u32 length, long Frames, long Bytes, long Milliseconds, BYTE BytesDeviation, BYTE MillisecondsDeviation);
ID3V2AddMusicCdIdentifierW(BYTE *arr, u32 length);
ID3V2AddOwnershipW(LPCWSTR Price, LPCWSTR dateString, LPCWSTR Seller);
ID3V2AddPictureArrayW(BYTE *arr, u32 Length, LPCWSTR Description, short PictureType);
ID3V2AddPictureFileW(LPCWSTR FileName, LPCWSTR Description, short PictureType, short asLink);
ID3V2AddPopularimeterW(LPCWSTR Email, short Rating, long Counter);
ID3V2AddPositionSynchronisationW(BYTE TimestampFormat, long Position);
ID3V2AddPrivateFrameW(BYTE *arr, u32 length, LPCWSTR URL);
ID3V2AddRecommendedBufferSizeW(long BufferSize, BYTE EmbeddedInfoFlag, long Offset);
ID3V2AddRelativeVolumeAdjustmentW(BYTE *arr, u32 length, LPCWSTR Identifier);
ID3V2AddReverbW(short reverbLeft, short reverbRight, BYTE bouncesLeft, BYTE bouncesRight, BYTE feedbackLeftToLeft, BYTE feedbackLeftToRight, BYTE feedbackRightToRight, BYTE feedbackRightToLeft, BYTE premixLeftToRight, BYTE premixRightToLeft);
ID3V2AddSeekOffsetW(long offset);
ID3V2AddSignatureFrameW(BYTE *arr, u32 length, short GroupSymbol);
ID3V2AddSynchronizedTempoW(BYTE *arr, u32 length, short Format);
ID3V2AddSyncLyricW(LPCWSTR Language, LPCWSTR Description, LPCWSTR Text, short ContentType, short TimeStampFormat);
ID3V2AddTableOfContentW(LPCWSTR ID, LPCWSTR Title, LPCWSTR Description, short isOrdered);
ID3V2AddUniqueFileIdentifierW(BYTE *arr, u32 length, LPCWSTR Owner);
ID3V2AddUserFrameW(LPCWSTR Language, LPCWSTR Text);
ID3V2AddUserTextW(LPCWSTR Description, LPCWSTR Text);
ID3V2AddUserURLW(LPCWSTR Description, LPCWSTR URL);
ID3V2DeleteAddendumW(LPCWSTR ID);
ID3V2DeleteAllFramesW(u32 FrameID);
ID3V2DeleteChildElementW(LPCWSTR ParentTocID, LPCWSTR ChildID);
ID3V2DeleteSelectedFrameW(u32 FrameID, short Index);
ID3V2DeleteSubFrameW(LPCWSTR ID, long FrameID);
ID3V2ExistsW();
ID3V2GetAddendumTypeW(LPCWSTR ID);
ID3V2GetAudioEncryptionPreviewLengthW(short Index);
ID3V2GetAudioEncryptionPreviewStartW(short Index);
ID3V2GetChildElementsW(LPCWSTR ID);
ID3V2GetCommercialFrameReceivedAsW(short Index);
ID3V2GetEncryptionSymbolW(short Index);
ID3V2GetEqualisationAdjustmentBitsW(short Index);
ID3V2GetEqualisationInterpolationW(short Index);
ID3V2GetEventTimingCodesTimestampFormatW();
ID3V2GetFrameCountW(u32 FrameID);
ID3V2GetGroupIdentificationSymbolW(short Index);
ID3V2GetPictureFileW(short Index, LPCWSTR FileName);
ID3V2GetPictureTypeW(short Index);
ID3V2GetPopularimeterRatingW(short Index);
ID3V2GetPositionSynchronisationTimestampFormatW();
ID3V2GetRecommendedBufferSizeFlagW();
ID3V2GetReverbBouncesLeftW();
ID3V2GetReverbBouncesRightW();
ID3V2GetReverbFeedbackLeftToLeftW();
ID3V2GetReverbFeedbackLeftToRightW();
ID3V2GetReverbFeedbackRightToLeftW();
ID3V2GetReverbFeedbackRightToRightW();
ID3V2GetReverbLeftW();
ID3V2GetReverbPremixLeftToRightW();
ID3V2GetReverbPremixRightToLeftW();
ID3V2GetReverbRightW();
ID3V2GetSignatureFrameGroupSymbolW(short Index);
ID3V2GetSubFrameImageTypeW(LPCWSTR ID, short Index);
ID3V2GetSubFramesW(LPCWSTR ID);
ID3V2GetSubFrameTypeW(LPCWSTR ID, short Index);
ID3V2GetSynchronizedTempoFormatW();
ID3V2GetSyncLyricContentTypeW(short Index);
ID3V2GetSyncLyricTimeFormatW(short Index);
ID3V2GetTOCIsOrderedW(LPCWSTR ID);
ID3V2ImportCueFileW(LPCWSTR FileName);
ID3V2RemoveTagFromFileW(LPCWSTR FileName);
ID3V2RemoveTagW();
ID3V2SaveChangesToFileW(LPCWSTR FileName);
ID3V2SaveChangesW();
ID3V2SetAddendumDescriptionW(LPCWSTR ID, LPCWSTR newDescription);
ID3V2SetAddendumTitleW(LPCWSTR ID, LPCWSTR newTitle);
ID3V2SetChapterTimesW(LPCWSTR ID, u32 startTime, u32 endTime);
ID3V2SetFormatAndEncodingW(int format, int encoding);
ID3V2SetImageSubFrameW(BYTE *arr, u32 maxLen, LPCWSTR ID, LPCWSTR Description, short PictureType);
ID3V2SetTextSubFrameW(LPCWSTR ID, long FrameID, LPCWSTR textString, LPCWSTR description);
ID3V2SetTOCIsOrderedW(LPCWSTR ID, short status);
ID3V2SetURLSubFrameW(LPCWSTR ID, long FrameID, LPCWSTR urlString, LPCWSTR description);
LYRICSExistsW();
LYRICSRemoveTagFromFileW(LPCWSTR FileName);
LYRICSRemoveTagW();
LYRICSSaveChangesToFileW(LPCWSTR FileName);
LYRICSSaveChangesW();
MONKEYGetBitsW();
MP4AddPictureArrayW(BYTE *arr, u32 Length);
MP4AddPictureFileW(LPCWSTR FileName);
MP4GetPictureFileW(LPCWSTR FileName, short Index);
MP4SaveChangesToFileW(LPCWSTR FileName);
MP4SaveChangesW();
MPEGIsCopyrightedW();
MPEGIsOriginalW();
MPEGIsPaddingW();
MPEGIsPrivateW();
MPEGIsProtectedW();
MPEGIsVBRW();
MPEGModifyCopyrightBitW(LPCWSTR FileName, short newValue);
MPEGModifyOriginalBitW(LPCWSTR FileName, short newValue);
MPEGModifyPrivateBitW(LPCWSTR FileName, short newValue);
MPPGetStreamVersionW();
OGGRemoveTagFromFileW(LPCWSTR FileName);
OGGRemoveTagW();
OGGSaveChangesToFileW(LPCWSTR FileName);
OGGSaveChangesW();
WAVGetFormatIDW();
WMADeletePictureW(short Index);
WMAGetPictureFileW(short Index, LPCWSTR PictureFileName);
WMAGetPicturesW();
WMAGetPictureTypeW(short Index);
WMASaveChangesToFileW(LPCWSTR FileName);
WMASaveChangesW();
WMASetPictureArrayW(BYTE *arr, u32 Length, LPCWSTR Description, short index, short PictureType);
WMASetPictureFileW(LPCWSTR PictureFileName, LPCWSTR Description, short Index, short PictureType);
D3V2GetChapterEndTimeW(LPCWSTR ID);
D3V2GetChapterStartTimeW(LPCWSTR ID);
D3V2GetSubFrameIDW(LPCWSTR ID, short Index);
APESetAlbumW(LPCWSTR textString);
APESetArtistW(LPCWSTR textString);
APESetCommentW(LPCWSTR textString);
APESetCopyrightW(LPCWSTR textString);
APESetGenreW(LPCWSTR textString);
APESetTitleW(LPCWSTR textString);
APESetTrackW(LPCWSTR textString);
APESetUserItemW(LPCWSTR Key, LPCWSTR textString);
APESetYearW(LPCWSTR textString);
AUDIOSetAlbumW(LPCWSTR textString);
AUDIOSetArtistW(LPCWSTR textString);
AUDIOSetCommentW(LPCWSTR textString);
AUDIOSetGenreW(LPCWSTR textString);
AUDIOSetTitleW(LPCWSTR textString);
AUDIOSetTrackW(LPCWSTR textString);
AUDIOSetYearW(LPCWSTR textString);
DisablePopupKeyW(LPCWSTR keyValue);
FLACSetAlbumW(LPCWSTR textString);
FLACSetArtistW(LPCWSTR textString);
FLACSetCommentW(LPCWSTR textString);
FLACSetContactW(LPCWSTR textString);
FLACSetCopyrightW(LPCWSTR textString);
FLACSetDateW(LPCWSTR textString);
FLACSetDescriptionW(LPCWSTR textString);
FLACSetGenreW(LPCWSTR textString);
FLACSetISRCW(LPCWSTR textString);
FLACSetLicenseW(LPCWSTR textString);
FLACSetLocationW(LPCWSTR textString);
FLACSetOrganizationW(LPCWSTR textString);
FLACSetPerformerW(LPCWSTR textString);
FLACSetTitleW(LPCWSTR textString);
FLACSetTrackW(LPCWSTR textString);
FLACSetUserItemW(LPCWSTR ItemKey, LPCWSTR textString);
FLACSetVendorW(LPCWSTR textString);
FLACSetVersionW(LPCWSTR textString);
ID3V1SetAlbumW(LPCWSTR textString);
ID3V1SetArtistW(LPCWSTR textString);
ID3V1SetCommentW(LPCWSTR textString);
ID3V1SetGenreIDW(short nNewValue);
ID3V1SetGenreW(LPCWSTR textString);
ID3V1SetTitleW(LPCWSTR textString);
ID3V1SetTrackW(LPCWSTR textString);
ID3V1SetYearW(LPCWSTR textString);
ID3V2SetGenreW(LPCWSTR textString);
ID3V2SetPlayCounterW(long counter);
ID3V2SetTextFrameW(u32 FrameID, LPCWSTR textString);
ID3V2SetURLFrameW(u32 FrameID, LPCWSTR textString);
LYRICSSetAlbumW(LPCWSTR textString);
LYRICSSetArtistW(LPCWSTR textString);
LYRICSSetAuthorW(LPCWSTR textString);
LYRICSSetGenreW(LPCWSTR textString);
LYRICSSetImageLinkW(LPCWSTR textString);
LYRICSSetIndicationW(LPCWSTR textString);
LYRICSSetInformationW(LPCWSTR textString);
LYRICSSetLyricsW(LPCWSTR textString);
LYRICSSetTitleW(LPCWSTR textString);
MP4SetGenreW(LPCWSTR textString);
MP4SetTextFrameW(u32 FrameID, LPCWSTR textString);
MP4SetTrackW(LPCWSTR textString);
OGGSetAlbumW(LPCWSTR textString);
OGGSetArtistW(LPCWSTR textString);
OGGSetCommentW(LPCWSTR textString);
OggSetContactW(LPCWSTR textString);
OGGSetCopyrightW(LPCWSTR textString);
OGGSetDateW(LPCWSTR textString);
OGGSetDescriptionW(LPCWSTR textString);
OGGSetGenreW(LPCWSTR textString);
OGGSetISRCW(LPCWSTR textString);
OGGSetLicenseW(LPCWSTR textString);
OGGSetLocationW(LPCWSTR textString);
OGGSetOrganizationW(LPCWSTR textString);
OGGSetPerformerW(LPCWSTR textString);
OGGSetTitleW(LPCWSTR textString);
OGGSetTrackW(LPCWSTR textString);
OGGSetUserItemW(LPCWSTR ItemKey, LPCWSTR textString);
OGGSetVendorW(LPCWSTR textString);
OGGSetVersionW(LPCWSTR textString);
SetConfigValueW(u32 key, u32 value);
SetLogFileW(LPCWSTR fileName);
WAVSetTextFrameW(u32 FrameID, LPCWSTR textString);
WMADeletePicturesW();
WMASetAlbumArtistW(LPCWSTR textString);
WMASetAlbumW(LPCWSTR textString);
WMASetArtistW(LPCWSTR textString);
WMASetAuthorURLW(LPCWSTR textString);
WMASetBeatsPerMinuteW(LPCWSTR textString);
WMASetCategoryW(LPCWSTR textString);
WMASetCommentW(LPCWSTR textString);
WMASetComposerW(LPCWSTR textString);
WMASetConductorW(LPCWSTR textString);
WMASetContentGroupDescriptionW(LPCWSTR textString);
WMASetCopyrightW(LPCWSTR textString);
WMASetDistributorW(LPCWSTR textString);
WMASetEncodedByW(LPCWSTR textString);
WMASetEncodingSettingsW(LPCWSTR textString);
WMASetEncodingTimeW(LPCWSTR textString);
WMASetGenreW(LPCWSTR textString);
WMASetInitialKeyW(LPCWSTR textString);
WMASetISRCW(LPCWSTR textString);
WMASetLanguageW(LPCWSTR textString);
WMASetLyricsW(LPCWSTR textString);
WMASetMoodW(LPCWSTR textString);
WMASetParentalRatingW(LPCWSTR textString);
WMASetPartOfSetW(LPCWSTR textString);
WMASetPeriodW(LPCWSTR textString);
WMASetProducerW(LPCWSTR textString);
WMASetPromotionURLW(LPCWSTR textString);
WMASetProviderW(LPCWSTR textString);
WMASetPublisherW(LPCWSTR textString);
WMASetRatingW(LPCWSTR textString);
WMASetTitleW(LPCWSTR textString);
WMASetToolNameW(LPCWSTR textString);
WMASetToolVersionW(LPCWSTR textString);
WMASetTrackNumberW(LPCWSTR textString);
WMASetUserItemW(LPCWSTR ItemKey, LPCWSTR textString);
WMASetUserWebURLW(LPCWSTR textString);
WMASetWriterW(LPCWSTR textString);
WMASetYearW(LPCWSTR textString);

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2010, 7:07 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
I'll write a wrapper for regular AHK. If someone wants to help/test: Let me know by posting here or sending me a message.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 10:27 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Now it is even much easier to use dlls in latest version Autohotkey_H, wrapped functions AudioGenie3.ahk, example:
Code:
dll=
file=
If !file or !dll
{
   FileSelectFile,dll,,,Select AudioGenie3.dll,AudioGenie3.dll
   FileSelectFile,file,,,Select an mp3 file,*.mp3
}   

ag3:=AudioGenie3(dll)
ag3.AUDIOAnalyzeFileW(file)
MsgBox % "Version: " ag3.ID3V2GetVersionW()
         . "`nTitle: " ag3.ID3V1GetTitleW()
         . "`nYear: " ag3.ID3V1GetYearW()

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 6:48 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Great job. Thats what I was talking about :)
Thumbs up for making this, or something like this, part of AHKL.

I guess some functions don't work because they need extra maintance, but the biggest part should work and that is enough help.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 7:34 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Thanks you, especially for this idea, I really love it, using dlls has never been that easy :D

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2010, 6:13 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
I finished my first wrapper for AudioGenie3.dll, please see this post

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: solution
PostPosted: August 29th, 2011, 4:14 pm 
to remove the box appeared at Audio genie activex
use resource hacker application open audiogenie activex and delete the box save 100% work


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Bon, Google Feedfetcher, SKAN and 6 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group