Re: Embed Windows Internet Explorer

2013-12-19 Thread Richard Webb
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

Re: How do you profile your apps under windows?

2013-08-09 Thread Richard Webb
The Very Sleepy profiler works ok (if you run the apps through cv2pdb to get the debug symbols in the right format at least)

Re: what keeps a COM object alive?

2013-06-12 Thread Richard Webb
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.

Re: what keeps a COM object alive?

2013-06-12 Thread Richard Webb
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,

Re: COM Example work for anyone?

2012-10-14 Thread Richard Webb
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 ?

Re: Accessing CoInit [is Troubleshooting Linker error]

2012-10-02 Thread Richard Webb
I haven't tried to use DMD 2.060 yet, will see if i've got time later.

Re: Troubleshooting Linker error (Symbol Undefined)

2012-10-01 Thread Richard Webb
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

Re: Map with maintained insertion order

2012-03-26 Thread Richard Webb
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).

Re: Calling a C++ Object from D

2012-01-24 Thread Richard Webb
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(

Re: Calling a C++ Object from D

2012-01-24 Thread Richard Webb
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.

Re: Any othe options for inserting into associative array?

2011-11-08 Thread Richard Webb
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

Re: Any othe options for inserting into associative array?

2011-11-07 Thread Richard Webb
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() {

Re: COM objects

2011-04-11 Thread Richard Webb
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.

Re: cannot evalute mixin(uuid("bla")) at compile time

2010-08-04 Thread Richard Webb
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.

Re: cannot evalute mixin(uuid("bla")) at compile time

2010-08-04 Thread Richard Webb
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

Re: cannot evalute mixin(uuid("bla")) at compile time

2010-08-03 Thread Richard Webb
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.

Problems with const/non-const overloads of member functions

2010-06-25 Thread Richard Webb
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

build problem with xfbuild

2010-06-10 Thread Richard Webb
mpile. Anyone got any ideas? Thanks, Richard Webb

std.array.Appender with fixed size arrays

2010-06-08 Thread 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

Re: Runtime error when accessing static data in a DLL

2009-12-24 Thread Richard Webb
Sounds like you might be running into this: http://d.puremagic.com/issues/show_bug.cgi?id=3342

Re: [D2] const vs structs

2009-12-11 Thread Richard Webb
Opened as 3606 and 3607. Thanks, Richard Webb

[D2] const vs structs

2009-12-10 Thread 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

Re: Startup from registry program doesn't work

2009-12-01 Thread Richard Webb
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.

Re: Startup from registry program doesn't work

2009-11-26 Thread Richard Webb
Do you need to be calling RegOpenKeyEx with KEY_WRITE instead of KEY_READ ?

Re: DLLs and headaches

2009-09-17 Thread Richard Webb
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