Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: runtime/bin/extensions_win.cc

Issue 9465004: Add native extensions for the Dart shell to mac and windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add MacOS implementation, refactor and create extensions.cc Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/extensions_win.cc
diff --git a/runtime/bin/extensions_win.cc b/runtime/bin/extensions_win.cc
index d81e670eef10218fe7bc68228faa4d0d88a9083c..d3b3653740daae7cb468d33c50e98a3c76163c77 100644
--- a/runtime/bin/extensions_win.cc
+++ b/runtime/bin/extensions_win.cc
@@ -4,11 +4,13 @@
#include "bin/extensions.h"
-#include "include/dart_api.h"
-#include "platform/assert.h"
+void* Extensions::LoadExtensionLibrary(const char* library_name) {
+ char* library_path = MakeString("%s.dll", library_name);
Mads Ager (google) 2012/03/07 14:31:48 lib%s.dll Either that or remove the lib prefix on
Bill Hesse 2012/03/08 12:04:37 I haven't seen any places where a DLL is called l
+ void* lib_handle = LoadLibrary(library_path);
+ delete[] library_path;
+ return lib_handle;
+}
-Dart_Handle Extensions::LoadExtension(const char* extension_url,
- Dart_Handle parent_library) {
- UNIMPLEMENTED();
- return NULL;
+void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
+ return GetProcAddress(reinterpret_cast<HMODULE>(lib_handle), symbol);
}

Powered by Google App Engine
This is Rietveld 408576698