AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

C++ DLL in Delphi einbinden

Ein Thema von Razor03 · begonnen am 4. Okt 2005 · letzter Beitrag vom 8. Okt 2005
Antwort Antwort
Razor03

Registriert seit: 1. Jul 2005
10 Beiträge
 
#1

Re: C++ DLL in Delphi einbinden

  Alt 5. Okt 2005, 19:46
Die cpp Datei habe ich natürlich auch. Nur kann ich wie gesagt nicht viel damit anfangen
Der Rest steht oben


Code:
PseudoDB* CreatePsuedoDB()
{
   return (PseudoDB*)new CPseudoDB;
}

int PseudoDB_LoadFromUSBRoot(PseudoDB* pDB,const wchar_t* sRoot)
{
   CPseudoDB* pObj=(CPseudoDB*)pDB;

   return pObj->loadFromUSBRoot(sRoot) ? 1 : 0;


void PseudoDB_Destroy(PseudoDB* pDB)
{
   CPseudoDB* pObj=(CPseudoDB*)pDB;

   delete pObj;
}

class CPseudoDB
{
public:
   CPseudoDB();
   ~CPseudoDB();

   bool loadFromUSBRoot(const wchar_t* sIPodRoot);
   bool loadFile(const wchar_t* sFilename);


   int newTrackID();

   bool findIPods();
   int getIPodCount();
   const wchar_t* getUSBRoot(int index);

   Track* newTrack();   
   static void freeTrack(Track* pTrack);

   Playlist* newPlaylist();
   static void freePlaylist(Playlist* pList);

   static void setString(gunichar2*& rpString,const gunichar2* sVal);

   static void itunesdb_convert_filename_fs2ipod (wchar_t* ipod_file);
   static void itunesdb_convert_filename_ipod2fs (wchar_t* ipod_file);
   static wchar_t *itunesdb_get_track_name_on_ipod (const wchar_t*path, Track *s);

protected:   
   void itunesdb_rename_files (const wchar_t*dirname);
   gboolean itunesdb_copy_track_to_ipod (const wchar_t*path, Track *track,
                    const wchar_t*pcfile);   
   gboolean itunesdb_cp (const wchar_t*from_file, const wchar_t*to_file);
   guint32 itunesdb_time_get_mac_time (void);   
   Track *itunesdb_new_track (void);
   time_t itunesdb_time_mac_to_host (guint32 mactime);
   guint32 itunesdb_time_host_to_mac (time_t time);

   /* structure to hold the contents of one entry of the Play Count file */
   typedef struct _playcount {
      guint32 playcount;
      guint32 time_played;
      gint32 rating;
   } playcount;

   gunichar2 * get_mhod (FILE *file, glong seek, gint32 *ml, gint32 *mty);
   glong get_pl(FILE *file, glong seek);
   glong get_mhit(FILE *file, glong seek);
   playcount *get_next_playcount (void);
   void reset_playcounts (void);
   void init_playcounts (const wchar_t*dirname);
   gboolean process_OTG_file (const wchar_t*filename,
              const wchar_t*plname);
   void read_OTG_playlists (const wchar_t*dirname);
   void mk_mhbd (FILE *file);
   void fix_mhbd (FILE *file, glong mhbd_seek, glong cur);
   void mk_mhsd (FILE *file, guint32 type);
   void fix_mhsd (FILE *file, glong mhsd_seek, glong cur);
   void mk_mhlt (FILE *file, guint32 track_num);
   void mk_mhit (FILE *file, Track *track);
   void fix_mhit (FILE *file, glong mhit_seek, glong cur, gint mhod_num);
   void mk_mhod (FILE *file, guint32 type,
           gunichar2 *string, guint32 fqid);
   void mk_mhlp (FILE *file, guint32 lists);
   void fix_mhlp (FILE *file, glong mhlp_seek, gint playlist_num);
   void mk_weired (FILE *file);
   void mk_mhyp (FILE *file, gunichar2 *listname,
           guint32 type, guint32 track_num);
   void fix_mhyp (FILE *file, glong mhyp_seek, glong cur);
   void mk_mhip (FILE *file, guint32 id);
   void write_mhsd_one(FILE *file);
   void write_playlist(FILE *file, Playlist *pl);
   void write_mhsd_two(FILE *file);
   gboolean write_it (FILE *file);


   gboolean it_add_track (Track *track);
   Playlist* it_add_playlist(Playlist *plitem);
   void it_add_trackid_to_playlist (Playlist* plitem, guint32 id);
   guint it_get_nr_of_tracks (void);
   Track *it_get_track_by_nr (guint32 n);
   guint32 it_get_nr_of_playlists (void);
   Playlist *it_get_playlist_by_nr (guint32 n);
   guint32 it_get_nr_of_tracks_in_playlist (Playlist *plitem);
   guint32 it_get_trackid_in_playlist_by_nr (Playlist *plitem, guint32 n);

   bool isIPodRoot(const wchar_t* sRoot);
   void clearIPodRoots();


   GList *CPseudoDB::playcounts;
   guint32 *CPseudoDB::mpl_ids;
   guint32 CPseudoDB::mpl_length;


   std::vector<Track*> m_aTracks;
   std::vector<Playlist*> m_aPlaylists;

   std::vector<wchar_t*> m_aIPodRoots;

   int m_NextTrackID;
};
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:55 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz