On 18/12/2013 20:48, Andre wrote:
> => myURL.bstrVal = SysAllocString(cast(const(wchar*))url);
Looks like the problem there is casting a string to a wchar* - I guess
the resulting BSTR will contain garbage instead of the intended value.
>
> It only works with statement:
> myURL.bstrVal = cas
The Very Sleepy profiler works ok (if you run the apps through
cv2pdb to get the debug symbols in the right format at least)
I was referring to the COM server support stuff in the Juno
library, which allocates COM objects outside the GC heap so the
GC will never collect them.
See
https://github.com/JesseKPhillips/Juno-Windows-Class-Library/blob/master/juno/com/core.d#L3147
for an example.
On Wednesday, 12 June 2013 at 14:41:05 UTC, finalpatch wrote:
This feels even more cumbersome than in C++ because in C++ we
can simply
delete this in the Release() method, there's no need to store a
reference in a global place.
Juno does this by allocating the object on the non-gc heap,
I haven't tried to run it, but as a random guess, does the user
your running it as have permissions to write to HKEY_CLASSES_ROOT
?
I haven't tried to use DMD 2.060 yet, will see if i've got time
later.
On Monday, 1 October 2012 at 15:22:20 UTC, Jesse Phillips wrote:
On Monday, 1 October 2012 at 05:04:32 UTC, Andrej Mitrovic
wrote:
Find oleaut32.dll in your Windows folder, and run implib on it:
$ implib oleaut32.lib oleaut32.dll /s
Thanks, I'll to play with this more because my first attemp
I've done that in C++ before using Boost.MultiIndex, and i saw a
post about a D port of that recently (I don't have the link to
hand though).
How about something like this (using Juno):
///
import juno.com.core, std.stdio;
abstract final class SystemInformation {
mixin(uuid("C01B9BA0-BEA7-41BA-B604-D0A36F469133"));
mixin Interfaces!(ISystemInformation);
}
interface ISystemInformation : IDispatch
{
mixin(uuid(
I've never used the Windows update API, but isn't it a COM interface rather
than a
C++ interface? You can call those directly from D.
I just looked at my local Juno source, and it does have the change that i
mentioned in that forum post. I just added an extra version of opAssign:
void opAssign(R)(R dg) if (is (R : MethodProxy) )
{
method = dg.method;
returnType = dg.returnType;
paramTypes = dg.paramTypes;
}
I
On 07/11/2011 20:27, Jesse Phillips wrote:
Came across this when trying to get Juno to work. Is there a good workaround
for it?
http://d.puremagic.com/issues/show_bug.cgi?id=6906
test.d(6): Error: function test.S.opAssign (int i) is not callable using
argument types (S)
void main() {
You could try looking at the Juno or DWin projects on dsource.
I've done a bit of COM stuff (both implementing com objects and using others) in
Juno and it worked ok, though unfortunately it needs some changes to get it to
work with the current D2.
I don't have a minimal example, but i have found that the error only occurs with
the most recent version of std.algorithm -> the current SVN version of phobos
with
the previous revision of algorithm compiles ok.
Dwin uses Tango and so only works in D1 anyway, so i don't know if thats the
problem (Juno uses string already, and i've used that ok in D1 and D2).
I've managed to get Juno working with a recent D2 before, but with the latest
SVN
version i get:
///
ph
The Juno library has a 'uuid' that works like that, and the posted example seems
to build ok here using DMD 1.062.
Theres also a Tango version of the same code in the dwin library, but i haven't
tried that for ages.
i either:
1) Change bar() to call this.foo() or
2) switch the 2 foo()s so that the const version is defined second.
The it compiles ok.
There are various const related issues in the bug tracker, but i don't
immediately see this one. Anyone know if it's a known thing?
Thanks,
Richard Webb
mpile.
Anyone got any ideas?
Thanks,
Richard Webb
Hi,
While trying to get some things to build in D2, i noticed that the code:
import std.array;
void main (string[] args)
{
string s;
auto app = appender(&s);
app.put(['a', 'b']);
}
/
works, but if it's changed to;
char[2] tmp = ['a', 'b'];
a
Sounds like you might be running into this:
http://d.puremagic.com/issues/show_bug.cgi?id=3342
Opened as 3606 and 3607.
Thanks,
Richard Webb
:
struct Foo
{
~this()
{
}
}
void Bar()
{
const Foo f;
}
Produces the error:
Error: destructor Foo.~this () is not callable using argument types ()
which seems a bit wrong?
Thanks,
Richard
Is the
DWORD length=pFileName.sizeof;
setting length to the size of the pointer, when you need the length of the
string? That would explain why only 4 bytes have been written.
Do you need to be calling RegOpenKeyEx with KEY_WRITE instead of KEY_READ ?
Don Wrote:
> If D2 -- I haven't been able to get D2 DLLs to work at all. They just
> crash during the initialization (something to do with initialising the
> thread-locals, I think, but I haven't been able to track it down
> completely).
Hi,
I've recently been having a go at writing a COM obje
25 matches
Mail list logo