View uMain_bcc32_interface_test.cpp
__interface INTERFACE_UUID("{CDD31E83-6E4E-4319-B2CA-98CCE8725E28}") IA : public IInterface
{
public:
virtual UnicodeString __fastcall a(DelphiInterface<TFunc__1<UnicodeString> > pro) = 0;
};
struct TA: public TCppInterfacedObject<IA, TFunc__1<UnicodeString> >
{
UnicodeString f_string1;
TObject* dummy_;
UnicodeString __fastcall Invoke(){ return f_string1;};
View uMain_touchbar_20170227.cpp
//---------------------------------------------------------------------------
#include <fmx.h>
#pragma hdrstop
#include "uMain_touchbar_20170227.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm1 *Form1;
View Main_WebModuleUnit1.cpp
//---------------------------------------------------------------------------
#include "Main_WebModuleUnit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TComponentClass WebModuleClass = __classid(TWebModule1);
//---------------------------------------------------------------------------
__fastcall TWebModule1::TWebModule1(TComponent* Owner)
View conf.h
#include <Data.DB.hpp>
#include <FireDAC.Comp.BatchMove.DataSet.hpp>
#include <FireDAC.Comp.BatchMove.hpp>
#include <FireDAC.Comp.BatchMove.SQL.hpp>
#include <FireDAC.Comp.BatchMove.Text.hpp>
#include <FireDAC.Comp.Client.hpp>
#include <FireDAC.Comp.DataSet.hpp>
#include <FireDAC.DApt.hpp>
#include <FireDAC.DApt.Intf.hpp>
#include <FireDAC.DatS.hpp>
View uTryStudy_JSONIterator.pas
unit uTryStudy_JSONIterator;
interface
uses
System.SysUtils, System.Variants, System.Classes,
System.JSON.Readers, System.JSON.Builders,
System.Generics.Collections, System.Types, System.Rtti;
type
TTryStudy_JSONIterator = class
class function json_to_array<T>(json_str,key_name: String; size_: Integer): TList<TValue>;
View uExcelToFireDAC.pas
unit uExcelToFireDAC;
interface
uses
System.SysUtils, System.Json, Winapi.ActiveX, Winapi.Windows,
System.Win.ComObj, Variants, System.Classes,
FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.MySQL,
FireDAC.Phys.MySQLDef, FireDAC.VCLUI.Wait, Data.DB, FireDAC.Comp.Client,
FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt,
View delphi_nifty_console.dpr
program delphi_nifty_console;
{*******************************************************}
{ }
{ ニフティクラウドmobile backend 接続 }
{ Delphi 10.1Berlin }
{ }
{*******************************************************}
{$APPTYPE CONSOLE}
{$R *.res}
View proc1.pas
procedure TForm1.test1; begin ShowMessage('procedure test1() //TThreadMethod.'); end;
procedure TForm1.FormCreate(Sender: TObject);
var
test_proc: TThreadMethod;
test_prop: Pointer;
procedure test();
begin
ShowMessage('procedure test() //procedure pointer.');
end;
View AnsiStrToPChar.cpp
//bcc64
AnsiString s1{"abcdefgh"};
std::unique_ptr<char> c1{new char[s1.Length()+1]};
char* c2 = c1.get();
memcpy(c1.get(), s1.c_str(),s1.Length());//メモリブロックコピー
std::string s2;
for (int i=0; i < s1.Length(); i++)
{
s2 = s2 + *c2;
View u_TFunc_test.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
#include <type_traits>