Извините, ничего не найдено.

Не расстраивайся! Лучше выпей чайку!
Регистрация
Справка
Календарь

Вернуться   forum.boolean.name > Программирование игр для компьютеров > Blitz3D > Библиотеки

Библиотеки Сторонние библиотеки для Blitz

Ответ
 
Опции темы
Старый 14.02.2007, 18:06   #1
PuSHiSTiCK
Оператор ЭВМ
 
Регистрация: 17.07.2006
Сообщений: 37
Написано 2 полезных сообщений
(для 0 пользователей)
Сообщение У кого-нибудь есть Visual C++ 7?

Я тут на БЛИТЦовском сайте в архиве кодов накопал исходник интересной ДЛЛ-ки, которая позволяет БлитЦУ под ХР записывать болванки, но у меня нету VC++ 7, чтобы ее компильнуть (диск покупать жаба мучает. Да и по магазинам такие сбоники у нас почти не наблюдаются)... Автор позже выложил исходник, но это было давно и не правда. На Savefile его файлик уже затерли.
Я выложу код ниже и, если кто сможет, Дайте ссылочку на то, что у вас получилось. Или может быть кто-нибудь нашел ее где-нибудь уже готовую... Вобщем пожалуйста выложите здесь DLL-ку или пришлите мне на мыло [email protected]

--Исходник--
/*
Functions

GetBurnFolder - Returns the directory path where you should
place your files, before burning them to disc

IsRecordableDrive() - Returns true if there is a recordable CD Device
on the system

GetRecordableDriveLetter() - Returns the drive letter of the recordable device
e.g. 'E:\'

BurnDisc(HWND hWnd) - Burn the data to disc... Parameter can be null (0)


*/



#include <windows.h>
#include <atlbase.h>
#include <atlstr.h>
#include <ShlObj.h>
#include <string.h>

#define BBDECL extern "C" _declspec(dllexport)
#define BBCALL _stdcall

class ICDBurnWrapper : public CComQIPtr<ICDBurn>
{
public:
HRESULT result;

ICDBurnWrapper() {
result = CoCreateInstance(CLSID_CDBurn,NULL,
CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER);
}

~ICDBurnWrapper() { }

BOOL Burn(HWND hwnd) {
result = (*this)->Burn(hwnd);
return SUCCEEDED(result);
}
BOOL HasRecordableDrive() {
BOOL bHasIt=FALSE;
result = (*this)->HasRecordableDrive(&bHasIt);
return (SUCCEEDED(result) && bHasIt);
}

CString GetRecorderDriveLetter() {
WCHAR d[32]={0};
result = (*this)->GetRecorderDriveLetter(d, sizeof(d)/sizeof(d[0]));

return d;
}

CString GetBurnFolderPath() {
TCHAR path[MAX_PATH]={0};
result = SHGetSpecialFolderPath(NULL, path, CSIDL_CDBURN_AREA, FALSE);
return path;
}
};

ICDBurnWrapper burner;

BBDECL const char * BBCALL GetBurnFolder(void)
{
return(burner.GetBurnFolderPath());
}

BBDECL BOOL BBCALL IsRecordableDrive(void)
{
BOOL isThereOne;
isThereOne = burner.HasRecordableDrive();
return(isThereOne);
}

BBDECL const char * BBCALL GetRecordableDriveLetter()
{
return(burner.GetRecorderDriveLetter());
}

BBDECL BOOL BBCALL BurnDisc(HWND hWnd)
{
return(burner.Burn(hWnd));
}

/*

--DECL-Ы--
.lib "ICDBurnDLL.dll"
GetBurnFolder$():"_GetBurnFolder@0"
IsRecordableDrive%():"_IsRecordableDrive@0"
GetRecordableDriveLetter$():"_GetRecordableDriveLe tter@0"
BurnDisc%(hWnd%):"_BurnDisc@4"
*/


/*

--БЛИТЦовский пример--

;ICDBurn example
;Written by Michael Denathorn 2006
;
;CD copying for Blitz.. wahey!!!

Local burnFolder$,result,recordDrive$

;Find out where we must drop our files for windows to
;copy from
burnFolder$ = GetBurnFolder$()+"\"

;Check to see if there's a recordable drive on the system
result = IsRecordableDrive()
If result = True
;If so, grab the drive letter
recordDrive$ = GetRecordableDriveLetter$()
Else
Notify "There is no recordable CD drive on the system"
End
End If

;Output the details
Print "The staging area where we put our files is:-"
Print burnFolder$
Print "The recordable device is ["+recordDrive$+"]"

;Find a file
moveFilepath$ = RequestFile("Select a file:","",False)

;Grab the specific filename from the path
;(Probably a quicker way... but its late!)
For loop = Len(moveFilepath$) To 1 Step -1
char$ = Mid$(moveFilepath$,loop,1)
If char$ = "\" Then Exit
tempfile$ = tempfile$ + char$
Next

For loop = Len(tempfile$) To 1 Step -1
char$ = Mid$(tempfile$,loop,1)
If char$ = "\" Then Exit
file$ = file$ + char$
Next


;Copy the file selected to the staging area, a notification
;tooltip should appear telling you the file(s) are ready
Print "Moving "+file$+" to the staging folder..."
CopyFile(moveFilepath$,burnFolder$+file$)

;Burn the files
result=Confirm("Burn File(s)",True)
If result=1 Then
result = BurnDisc(0)
Else
Notify "You cancelled the process!"
EndIf

Print "Finished!!!"
WaitKey
(Offline)
 
Ответить с цитированием
Старый 14.02.2007, 20:35   #2
jimon
 
Сообщений: n/a
Re: У кого-нибудь есть Visual C++ 7?

вот скомпилил, но не проверял
 
Ответить с цитированием
Ответ


Опции темы

Ваши права в разделе
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы не можете редактировать сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
У кого есть Windows XP Home Edition? Knightmare Болтовня 2 28.07.2009 15:38
У кого-нибудь есть запись дикого ржача? ))) Phantom Болтовня 3 20.11.2008 21:01
у кого есть IGLass ? jimon Болтовня 8 18.08.2007 04:14
BlitzMax(Linux): У кого есть? c0mrad 2D-программирование 6 02.03.2007 23:17


Часовой пояс GMT +4, время: 20:30.


vBulletin® Version 3.6.5.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot
Style crйe par Allan - vBulletin-Ressources.com