On Sunday, 27 December 2015 at 03:34:18 UTC, riki wrote:
void ccf(const char* str){}
void cwf(const wchar* str){}
void main()
{
ccf("aaa");//ok
cwf("xxx"w); // error and why ?
}
You need to remove the w suffix. Otherwise it is forcibly typed
as a dynamic array and is no longer im
There's a wrapper for it that will be included in Phobos. This wrapper is
easier to work with for D.
It has structs for HTTP, FTP and SMTP.
https://github.com/jcd/phobos/blob/curl-wrapper/etc/curl.d
2012/1/10 simendsjo
> Anyone using this module?
> For a complete curl newbie, it's far from s
I'm not sure.
Try __gshared string str = "a";
2011/10/1 Dainius (GreatEmerald)
> > However, this gets quite inefficient with a lot of different strings,
>
> I just had an idea, perhaps it's possible to work around this
> particular point by creating a wrapper function that converts the
> passed
The other way is a bit more complicated.
Try this:
import std.stdio;
import core.stdc.string;
import std.string;
extern(Windows) {
bool OpenClipboard(void*);
void* GetClipboardData(uint);
void* SetClipboardData(uint, void*);
bool EmptyClipboard();
bool CloseClipboard();
void* Gl
Here's an example I've quickly put together for you:
import std.stdio;
import core.stdc.string;
extern(Windows) {
void* GetClipboardData(uint);
bool OpenClipboard(void*);
}
void main() {
if (OpenClipboard(null)) {
auto cstr = cast(char*)GetClipboardData(1);
if (cstr)
Well, it doesn't matter what you've used in the past :-)
Take a look:
http://msdn.microsoft.com/en-us/library/ms907128.aspx
On Sun, Sep 11, 2011 at 5:29 PM, Joel Christensen wrote:
> Hi,
>
> I've got a text program I'm working on. It has game like print. But I want
> to be able to copy to the
On Mon, Aug 15, 2011 at 12:16 PM, mimocrocodil <4deni...@gmail.com> wrote:
> I obtain immutable(byte)* and int where contained length of bytes block
> from C library.
>
> Can I convert this into byte[] without explict copying etc.
>
> Something like:
>
> byte* p; // bytes
> int size; // size of by
Yes, add it as an ICON resource.
In a .rc file:
100 ICON "icon.ico"
Then compile the resource file with your favorite resource compiler.
Then pass the .res file as an argument to dmd.
On Mon, Aug 1, 2011 at 10:27 AM, Nrgyzer wrote:
> Hi guys,
>
> the most applications using there own icons for
Oh, I see.
That's very convenient.
On Wed, Jul 20, 2011 at 12:04 AM, Andrej Mitrovic <
andrej.mitrov...@gmail.com> wrote:
> On 7/20/11, Jimmy Cao wrote:
> > What? I've never needed to do that when compiling programs with
> > -L/exet:nt/su:windows:4.0
> >
On Tue, Jul 19, 2011 at 6:48 PM, Andrej Mitrovic wrote:
>
> This is similar to how it's done for Windows GUI applications, where
> we have to manually run the initialize function in druntime (unless
> it's hidden by some GUI framework).
>
What? I've never needed to do that when compiling progra
On Tue, Jun 28, 2011 at 11:15 PM, Joshua Niehus wrote:
> Hello,
>
> I was trying to run the example on the Interfacing to C page (
> http://www.d-programming-language.org/interfaceToC.html) and ran into few
> issues. To get it to work "as is" i was .dup(ing) strings into new chars
> with defined
On Sun, Jun 26, 2011 at 5:00 PM, Alex_Dovhal wrote:
> "Robert Clipsham" wrote:
> > On 26/06/2011 20:54, Alex_Dovhal wrote:
> >> I'd like to call C functions and use C variables in D module.
> >> D calls C functions just fine, but how can I use C variables?
> >
> > extern(C) extern int myCVar;
>
On Sat, Jun 25, 2011 at 2:48 PM, Loopback wrote:
> Hello!
>
> I've recently been working with DirectInput using the win32 API Binding
> at dsource.org. This wrapper has been working perfectly fine until I
> started using GUID constants defined in win32.directx.dinput8.
>
> The directx function Di
On Fri, Jun 24, 2011 at 10:41 PM, Nub Public wrote:
> Is there a way to remove all elements in an associative array?
>
> I tried clear() but it doesn't work. For some reason it sets the length of
> the array to gibberish. What does clear() do exactly?
>
This same thing was asked many years ago:
On Wed, Jun 22, 2011 at 1:31 PM, Ali Çehreli wrote:
> On Wed, 22 Jun 2011 20:17:39 +0200, Andrej Mitrovic wrote:
>
> > This library has some nice user-input methods for D2:
> > https://github.com/he-the-great/JPDLibs/tree/cmdln
>
> Thanks! :)
>
> The Turkish D community has experimented with a si
I've done some major restructuring to the ebook. Now, the link to the first
lesson is:
http://en.wikibooks.org/wiki/D_(The_Programming_Language)/d2/Phobos/Lesson_1
There are 7 lessons currently. Lesson 3 (Functions) and 9 (Slicing) are not
written as of now.
If you contribute, please add yourself
On Mon, Jun 20, 2011 at 5:13 PM, Kai Meyer wrote:
> On 06/20/2011 03:46 PM, Jose Armando Garcia wrote:
>
>> On Mon, Jun 20, 2011 at 6:30 PM, Jimmy Cao wrote:
>>
>>> I helped with something last summer: an attempt at creating a wikibook
>>> for
>>>
&g
On Mon, Jun 20, 2011 at 4:46 PM, Jose Armando Garcia wrote:
> Good idea. Small notes:
>
> *) In the tip section 'write("Hello\n") and writeln("Hello")' are not
> the same. writeln and writefln flush. write doesn't.
> *) Not sure if you want to also encourage portable code. "\n" should
> be replace
I helped with something last summer: an attempt at creating a wikibook for
D. At that time, my D skills were very bad, so I had to concentrate on
learning D first before contributing to more lessons.
One thing that has always bothered me is, there aren't many good *free*
ebooks for learning D.
We
http://stackoverflow.com/questions/6328444/type-classes-in-d
This guy seems to be very optimistic about D's functional possibilities.
Unfortunately, the only answer there right now is a generic ramble
concerning D.
I've even created a dll that is used as a keylogger hook thing for Windows
with only D.
It's for Windows only.
Try this:
implib /s libmysql.lib libmysql.dll
Then change extern(Windows) to extern(C).
(That's how I usually have it set up)
Maybe it's too big.
Just post a download link.
24 matches
Mail list logo