![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
|
|
#1
|
|||
|
|||
|
Código:
#ifndef SNAKEDLIBRARY_H
#define SNAKEDLIBRARY_H
#ifdef __cplusplus
extern "C" {
#endif
// Funciones exportadas
__declspec(dllimport) bool IsValidEmail(const char* email);
__declspec(dllimport) const char* GetCurrentDateTime();
__declspec(dllimport) int CalculateAge(const char* birth);
__declspec(dllimport) const char* ToUpperCase(const char* text);
__declspec(dllimport) const char* GenerateUUID();
__declspec(dllimport) int WordCount(const char* text);
__declspec(dllimport) void StartTimer();
__declspec(dllimport) double StopTimer();
__declspec(dllimport) void MicroDelay(long MicroSecs);
__declspec(dllimport) void ScreenShot(char*BmpName);
__declspec(dllimport) const char* PassHash(const char* passwd, int encoding);
__declspec(dllimport) const char* PT_Element(AnsiString Command);
#ifdef __cplusplus
}
#endif
#endif // SNAKEDLIBRARY_H
Pronto os pasare algo para que la probéis os paso un capture de lo que voy haciendo: ![]() Última edición por navbuoy fecha: 19-06-2025 a las 04:30:31. |
|
#2
|
||||
|
||||
![]() ![]() ![]() ![]()
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi ![]() P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
|
#3
|
|||
|
|||
|
He añadido algunas funciones mas:
Cita:
Código:
#ifndef SNAKEDLIBRARY_H
#define SNAKEDLIBRARY_H
#ifdef __cplusplus
extern "C" {
#endif
// Funciones exportadas
// Elimina espacios al principio y final de una cadena
__declspec(dllimport) char* trim(char* str);
// Invierte una cadena
__declspec(dllimport) void reverse(char* str);
// Devuelve true (1) si la cadena es numérica
__declspec(dllimport) int isNumeric(const char* str);
// Convierte toda la cadena a minúsculas
__declspec(dllimport) void toLower(char* str);
// Reproduce Fichero de sonido WAV
__declspec(dllimport) void PlayWAV(const char* ruta);
// Cambia Modo Grafico del PC
__declspec(dllimport) bool SwitchGraphicMode(int width, int height, int bpp);
// Valida el E-Mail
__declspec(dllimport) bool IsValidEmail(const char* email);
// Obtiene Fecha/Hora Actual
__declspec(dllimport) const char* GetCurrentDateTime();
// Calcula una Edad con la fecha de nacimiento
__declspec(dllimport) int CalculateAge(const char* birth);
// Pone todo en MAYUSCULAS
__declspec(dllimport) const char* ToUpperCase(const char* text);
// Generar el UUID
__declspec(dllimport) const char* GenerateUUID();
// Cuenta el numero de palabras en el texto
__declspec(dllimport) int WordCount(const char* text);
// Timer de Tiempo "elapsed" inicia el contador
__declspec(dllimport) void StartTimer();
// Timer de Tiempo "elapsed" detiene el contador
__declspec(dllimport) double StopTimer();
// Funcion de DELAY de MicroSegundos
__declspec(dllimport) void MicroDelay(long MicroSecs);
// Capturador de PANTALLA del PC (archivo BMP)
__declspec(dllimport) void ScreenShot(char*BmpName);
// Encripta un Password con SHA
__declspec(dllimport) const char* PassHash(const char* passwd, int encoding);
// Obtiene informacion de la TABLA PERIODICA DE ELEMENTOS
__declspec(dllimport) const char* PT_Element(AnsiString Command);
#ifdef __cplusplus
}
#endif
Última edición por navbuoy fecha: 19-06-2025 a las 17:10:35. |
|
#4
|
|||
|
|||
|
de momento ya llevo esto hecho:
Código:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Functions in Snaked Library 1.0 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void bubble_sort( int a[], int n ); DESCRIPTION: this function sort a array of int elements IN: array of int numbers - number of elements RETURN: nothing ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// char* trim(char* str); DESCRIPTION: This function erase the spaces into the string IN: char* string RETURN: char* string trimmed (erase spaces) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// char* reverse(char* str); DESCRIPTION: This function reverse the string IN: char* string RETURN: the same string but reversed ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int isNumeric(const char* str); DESCRIPTION: This function say us if the string is numeric IN: char* string RETURN: int value (0 - No valid number 1 - Valid numeric string) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void toLower(char* str); DESCRIPTION: This function change the characters to lowercase IN: char* string RETURN: nothing ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void PlayWAV(const char* ruta); DESCRIPTION: This function play a WAV sound file using PlaySound Windows API func IN: char* string with path and wav file RETURN: nothing ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool SwitchGraphicMode(int width, int height, int bpp, int frequency); DESCRIPTION: This function switch the Graphic Mode in the Desktop IN: int width - int height - int bpp (bits per pixel) - int frequency RETURN: int value (0 - Success - other values - Error) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void SaveOriginalGraphicMode() DESCRIPTION: This function save the current Graphic Mode of the machine ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void RestoreOriginalGraphicMode() DESCRIPTION: This function restore the original graphic mode previously saved ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool IsValidEmail(const char* email); DESCRIPTION: This function validate a correct email address IN: char* string with email RETURN: int value (1 (True) - Success - 0 (False) - Error) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* GetCurrentDateTime(); DESCRIPTION: This function returns the current Date/Time information IN: Nothing RETURN: const char* string with information of Date/Time ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int CalculateAge(const char* birth); DESCRIPTION: This function calculate the AGE from a birth Date IN: const char* string with Date RETURN: int value with Age ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* ToUpperCase(const char* text); DESCRIPTION: This function change the string to UpperCase characters IN: const char* text RETURN: const char* with converted to UpperCase string ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* GenerateUUID(); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int WordCount(const char* text); DESCRIPTION: This function count words in a given text IN: const char* string (text) RETURN: int value (Num of Words) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void StartTimer(); DESCRIPTION: This function start a internal elapsed time meter IN: nothing RETURN: nothing ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// double StopTimer(); DESCRIPTION: Stop the elapsed time meter and return time elapsed in Milliseconds IN: nothing RETURN: double value (Milliseconds) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void MicroDelay(long MicroSecs); DESCRIPTION: This function make a Delay pause in MicroSecs IN: long Microseconds RETURN: Nothing ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void ScreenShot(char*BmpName) DESCRIPTION: This function make a screen capture of the Desktop in BMP format IN: char* string with bitmap filename (ended in .bmp) RETURN: Nothing, just make the screenshot and write it in disk ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* PassHash(const char* passwd, int encoding); DESCRIPTION: This function Encode a text string to a SHA encoded hashed password IN: const char* passwd - int encoding (0) SHA224 - (1) SHA256 - (2) SHA384 - (3) SHA512 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* PT_Element(AnsiString Command); DESCRIPTION: This function return information of the element of Periodic Table IN: AnsiString Command (can be the numeric number of element, or name or element or formulation name) RETURN: const char* with desired information ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ![]() Última edición por navbuoy fecha: 20-06-2025 a las 12:08:11. |
|
#5
|
|||
|
|||
![]() |
|
#6
|
|||
|
|||
![]() |
![]() |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Stardust by Snaked & Joe - Web Oficial | navbuoy | Noticias | 2 | 20-10-2024 07:58:19 |
| Para imprimir PDF: Free PDF Library for Delphi Developers - Quick PDF Library LITE | rrf | Varios | 5 | 26-04-2019 18:30:17 |
| Library Path en FPC de iOS | kotai | FireMonkey | 5 | 18-06-2012 12:34:52 |
| Db-library network | chavito_123 | Varios | 0 | 08-08-2007 05:09:43 |
|